{
  "components": {
    "schemas": {
      "PublicApiError": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "invalid_request",
                  "conflict",
                  "idempotency_conflict",
                  "operation_in_progress",
                  "quota_exceeded",
                  "rate_limited",
                  "temporarily_unavailable",
                  "internal_error"
                ],
                "type": "string"
              },
              "details": {
                "additionalProperties": false,
                "properties": {
                  "fields": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "path": {
                          "pattern": "^[A-Za-z0-9_.[\\]-]{1,120}$",
                          "type": "string"
                        },
                        "reason": {
                          "enum": [
                            "required",
                            "invalid",
                            "out_of_range"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "reason"
                      ],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "limit": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "retryAfterSeconds": {
                    "maximum": 86400,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "usage": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "message": {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "requestId": {
                "pattern": "^[A-Za-z0-9_-]{1,128}$",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "Server-side API-key environment variable; explicit scopes and the creator's current permissions apply.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Workspace-bound API for authorized customer workflows. Generic synthetic examples; no credential collection or browser request execution.",
    "title": "ScopeWorth Customer API",
    "version": "v1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/ai-economics": {
      "get": {
        "description": "Read source-reported AI usage, adoption and measured cycle-time comparisons for an accessible project or client selection. Dates use the same effective reporting window as Command Center. Assistance tags are self-reported and comparisons are observational, not a causal productivity claim. Currency conversions and missing prices remain explicit. Returns one aggregate response with no person ranking or pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
        "operationId": "aiEconomics.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "adoption": {
                        "assistedChanges": 0,
                        "basis": "merged changes counted by self-reported AI tags",
                        "byRepository": [],
                        "byWorkType": [],
                        "conflictingChanges": 0,
                        "mergedChanges": 0,
                        "notAssistedChanges": 0,
                        "provenance": "self_reported",
                        "taggedEvidence": [],
                        "taggedEvidenceTotal": 0,
                        "tools": [],
                        "untaggedChanges": 0,
                        "workTypeLinks": {
                          "byOrigin": {
                            "connector": 0,
                            "heuristic": 0,
                            "manual": 0
                          },
                          "linkedChanges": 0
                        }
                      },
                      "cycleTime": {
                        "assistedChanges": 0,
                        "baselineChanges": 0,
                        "gain": null,
                        "unavailableReason": "No merged self-reported AI-assisted changes have complete forge timestamps."
                      },
                      "usage": {
                        "assumptions": [],
                        "selfReported": {
                          "assistedChanges": 0,
                          "assistedShare": null,
                          "conflictingChanges": 0,
                          "notAssistedChanges": 0,
                          "taggedChanges": 0,
                          "tools": []
                        },
                        "unavailable": [],
                        "vendors": [],
                        "vendorWindowSelection": null
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "adoption": {
                      "additionalProperties": false,
                      "properties": {
                        "assistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "basis": {
                          "const": "merged changes counted by self-reported AI tags",
                          "type": "string"
                        },
                        "byRepository": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "assistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "conflictingChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "mergedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notAssistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "repository": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tools": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "changes": {
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991,
                                      "type": "integer"
                                    },
                                    "tool": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tool",
                                    "changes"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "untaggedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mergedChanges",
                              "assistedChanges",
                              "notAssistedChanges",
                              "conflictingChanges",
                              "untaggedChanges",
                              "tools",
                              "repository"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "byWorkType": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "assistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "conflictingChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "mergedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notAssistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "tools": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "changes": {
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991,
                                      "type": "integer"
                                    },
                                    "tool": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tool",
                                    "changes"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "untaggedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "workType": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "const": "mixed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unlinked",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "mergedChanges",
                              "assistedChanges",
                              "notAssistedChanges",
                              "conflictingChanges",
                              "untaggedChanges",
                              "tools",
                              "workType"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "conflictingChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "mergedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "notAssistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "provenance": {
                          "const": "self_reported",
                          "type": "string"
                        },
                        "taggedEvidence": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "mergedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "reference": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "repository": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "signalSources": {
                                "items": {
                                  "enum": [
                                    "pr_label",
                                    "commit_trailer",
                                    "csv_column"
                                  ],
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "status": {
                                "enum": [
                                  "assisted",
                                  "not_assisted",
                                  "conflicting"
                                ],
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tools": {
                                "items": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "workItemKeys": {
                                "items": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "workType": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "const": "mixed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unlinked",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "reference",
                              "title",
                              "repository",
                              "url",
                              "mergedAt",
                              "status",
                              "workType",
                              "workItemKeys",
                              "signalSources",
                              "tools"
                            ],
                            "type": "object"
                          },
                          "maxItems": 100,
                          "type": "array"
                        },
                        "taggedEvidenceTotal": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "tools": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "changes": {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              "tool": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "tool",
                              "changes"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "untaggedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "workTypeLinks": {
                          "additionalProperties": false,
                          "properties": {
                            "byOrigin": {
                              "additionalProperties": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "propertyNames": {
                                "enum": [
                                  "connector",
                                  "heuristic",
                                  "manual"
                                ],
                                "type": "string"
                              },
                              "required": [
                                "connector",
                                "heuristic",
                                "manual"
                              ],
                              "type": "object"
                            },
                            "linkedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "linkedChanges",
                            "byOrigin"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "mergedChanges",
                        "assistedChanges",
                        "notAssistedChanges",
                        "conflictingChanges",
                        "untaggedChanges",
                        "tools",
                        "provenance",
                        "basis",
                        "byRepository",
                        "byWorkType",
                        "workTypeLinks",
                        "taggedEvidence",
                        "taggedEvidenceTotal"
                      ],
                      "type": "object"
                    },
                    "cycleTime": {
                      "additionalProperties": false,
                      "properties": {
                        "assistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "baselineChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "gain": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "assistedChanges": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                "baselineChanges": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                "basis": {
                                  "const": "forge timestamps compared by self-reported AI tagging",
                                  "type": "string"
                                },
                                "implementationHoursSaved": {
                                  "type": "number"
                                },
                                "netHours": {
                                  "type": "number"
                                },
                                "provenance": {
                                  "const": "self_reported",
                                  "type": "string"
                                },
                                "reviewOverheadHours": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "provenance",
                                "basis",
                                "assistedChanges",
                                "baselineChanges",
                                "implementationHoursSaved",
                                "reviewOverheadHours",
                                "netHours"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unavailableReason": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "gain",
                        "assistedChanges",
                        "baselineChanges",
                        "unavailableReason"
                      ],
                      "type": "object"
                    },
                    "usage": {
                      "additionalProperties": false,
                      "properties": {
                        "assumptions": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "figure": {
                                "additionalProperties": false,
                                "properties": {
                                  "basis": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "provenance": {
                                    "enum": [
                                      "self_reported",
                                      "vendor_reported",
                                      "modeled",
                                      "provider_export",
                                      "user_declared"
                                    ],
                                    "type": "string"
                                  },
                                  "unit": {
                                    "enum": [
                                      "lines",
                                      "count",
                                      "ratio",
                                      "tokens",
                                      "cents",
                                      "band",
                                      "percent",
                                      "credits"
                                    ],
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "value",
                                  "unit",
                                  "provenance",
                                  "basis"
                                ],
                                "type": "object"
                              },
                              "id": {
                                "enum": [
                                  "assisted_pct",
                                  "review_overhead_pct"
                                ],
                                "type": "string"
                              },
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "note": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "figure",
                              "note"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "selfReported": {
                          "additionalProperties": false,
                          "properties": {
                            "assistedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "assistedShare": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "basis": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "provenance": {
                                      "enum": [
                                        "self_reported",
                                        "vendor_reported",
                                        "modeled",
                                        "provider_export",
                                        "user_declared"
                                      ],
                                      "type": "string"
                                    },
                                    "unit": {
                                      "enum": [
                                        "lines",
                                        "count",
                                        "ratio",
                                        "tokens",
                                        "cents",
                                        "band",
                                        "percent",
                                        "credits"
                                      ],
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "value",
                                    "unit",
                                    "provenance",
                                    "basis"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "conflictingChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "notAssistedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "taggedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "tools": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "taggedChanges",
                            "assistedChanges",
                            "notAssistedChanges",
                            "conflictingChanges",
                            "assistedShare",
                            "tools"
                          ],
                          "type": "object"
                        },
                        "unavailable": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "fact": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "reason": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "copilot",
                                  "cursor",
                                  "claude_code",
                                  "claude_enterprise",
                                  "codex",
                                  "gemini",
                                  "csv"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "source",
                              "fact",
                              "reason"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "vendors": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "acceptedLinesSeries": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "value": {
                                      "type": "number"
                                    },
                                    "windowEnd": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "windowStart": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "windowStart",
                                    "windowEnd",
                                    "value"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "activeSeats": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "band": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "from": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "label": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "to": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "from",
                                          "to",
                                          "label"
                                        ],
                                        "type": "object"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "self_reported",
                                          "vendor_reported",
                                          "modeled",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "band",
                                      "provenance"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "agentDiffAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "self_reported",
                                          "vendor_reported",
                                          "modeled",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "unit": {
                                        "enum": [
                                          "lines",
                                          "count",
                                          "ratio",
                                          "tokens",
                                          "cents",
                                          "band",
                                          "percent",
                                          "credits"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "unit",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lineAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "self_reported",
                                          "vendor_reported",
                                          "modeled",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "unit": {
                                        "enum": [
                                          "lines",
                                          "count",
                                          "ratio",
                                          "tokens",
                                          "cents",
                                          "band",
                                          "percent",
                                          "credits"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "unit",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "models": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "figure": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "basis": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "provenance": {
                                          "enum": [
                                            "self_reported",
                                            "vendor_reported",
                                            "modeled",
                                            "provider_export",
                                            "user_declared"
                                          ],
                                          "type": "string"
                                        },
                                        "unit": {
                                          "enum": [
                                            "lines",
                                            "count",
                                            "ratio",
                                            "tokens",
                                            "cents",
                                            "band",
                                            "percent",
                                            "credits"
                                          ],
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "unit",
                                        "provenance",
                                        "basis"
                                      ],
                                      "type": "object"
                                    },
                                    "metric": {
                                      "enum": [
                                        "accepted_lines",
                                        "deleted_lines",
                                        "suggested_lines",
                                        "tab_suggestions",
                                        "tab_accepts",
                                        "agent_suggested_diffs",
                                        "agent_accepted_diffs",
                                        "tool_actions_accepted",
                                        "tool_actions_rejected",
                                        "chats",
                                        "sessions",
                                        "agent_commits",
                                        "agent_prs_created",
                                        "agent_prs_merged",
                                        "active_seats_band",
                                        "tokens_input",
                                        "tokens_output",
                                        "estimated_cost_cents",
                                        "credits",
                                        "threads",
                                        "turns",
                                        "code_reviews",
                                        "review_comments"
                                      ],
                                      "type": "string"
                                    },
                                    "model": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "model",
                                    "metric",
                                    "figure"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "originId": {
                                "type": "string"
                              },
                              "provenance": {
                                "enum": [
                                  "self_reported",
                                  "vendor_reported",
                                  "modeled",
                                  "provider_export",
                                  "user_declared"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "copilot",
                                  "cursor",
                                  "claude_code",
                                  "claude_enterprise",
                                  "codex",
                                  "gemini",
                                  "csv"
                                ],
                                "type": "string"
                              },
                              "sourceScope": {
                                "type": "string"
                              },
                              "tabAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "self_reported",
                                          "vendor_reported",
                                          "modeled",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "unit": {
                                        "enum": [
                                          "lines",
                                          "count",
                                          "ratio",
                                          "tokens",
                                          "cents",
                                          "band",
                                          "percent",
                                          "credits"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "unit",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "toolActionAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "self_reported",
                                          "vendor_reported",
                                          "modeled",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "unit": {
                                        "enum": [
                                          "lines",
                                          "count",
                                          "ratio",
                                          "tokens",
                                          "cents",
                                          "band",
                                          "percent",
                                          "credits"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "unit",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totals": {
                                "additionalProperties": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "basis": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "provenance": {
                                      "enum": [
                                        "self_reported",
                                        "vendor_reported",
                                        "modeled",
                                        "provider_export",
                                        "user_declared"
                                      ],
                                      "type": "string"
                                    },
                                    "unit": {
                                      "enum": [
                                        "lines",
                                        "count",
                                        "ratio",
                                        "tokens",
                                        "cents",
                                        "band",
                                        "percent",
                                        "credits"
                                      ],
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "value",
                                    "unit",
                                    "provenance",
                                    "basis"
                                  ],
                                  "type": "object"
                                },
                                "propertyNames": {
                                  "enum": [
                                    "accepted_lines",
                                    "deleted_lines",
                                    "suggested_lines",
                                    "tab_suggestions",
                                    "tab_accepts",
                                    "agent_suggested_diffs",
                                    "agent_accepted_diffs",
                                    "tool_actions_accepted",
                                    "tool_actions_rejected",
                                    "chats",
                                    "sessions",
                                    "agent_commits",
                                    "agent_prs_created",
                                    "agent_prs_merged",
                                    "active_seats_band",
                                    "tokens_input",
                                    "tokens_output",
                                    "estimated_cost_cents",
                                    "credits",
                                    "threads",
                                    "turns",
                                    "code_reviews",
                                    "review_comments"
                                  ],
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "unavailable": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fact": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "reason": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "source": {
                                      "enum": [
                                        "copilot",
                                        "cursor",
                                        "claude_code",
                                        "claude_enterprise",
                                        "codex",
                                        "gemini",
                                        "csv"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "source",
                                    "fact",
                                    "reason"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "windowEnd": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "windowStart": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "source",
                              "windowStart",
                              "windowEnd",
                              "totals",
                              "lineAcceptanceRate",
                              "tabAcceptanceRate",
                              "agentDiffAcceptanceRate",
                              "toolActionAcceptanceRate",
                              "activeSeats",
                              "models",
                              "acceptedLinesSeries",
                              "unavailable"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "vendorWindowSelection": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "mode": {
                                  "const": "full_overlapping_windows",
                                  "type": "string"
                                },
                                "requestedEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "requestedStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "timeZone": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "requestedStart",
                                "requestedEnd",
                                "timeZone",
                                "mode"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "selfReported",
                        "vendorWindowSelection",
                        "vendors",
                        "assumptions",
                        "unavailable"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "cycleTime",
                    "usage",
                    "adoption"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read measured AI economics",
        "tags": [
          "intelligence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "ai_economics.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "ai-economics:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/ai-economics/surface": {
      "get": {
        "description": "Read the serializable interpretation used by the AI Economics screen, including unavailable states and confidence when a project and reporting period are selected. It uses exactly the same source facts and reporting window as the AI economics facts endpoint. Null or insufficient comparisons must retain their qualifier. This is a single response without pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
        "operationId": "aiEconomics.surface",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "adoption": {
                        "assistedChanges": 0,
                        "basis": "merged changes counted by self-reported AI tags",
                        "byRepository": [],
                        "byWorkType": [],
                        "conflictingChanges": 0,
                        "mergedChanges": 0,
                        "notAssistedChanges": 0,
                        "provenance": "self_reported",
                        "taggedEvidence": [],
                        "taggedEvidenceTotal": 0,
                        "tools": [],
                        "untaggedChanges": 0,
                        "workTypeLinks": {
                          "byOrigin": {
                            "connector": 0,
                            "heuristic": 0,
                            "manual": 0
                          },
                          "linkedChanges": 0
                        }
                      },
                      "comparison": {
                        "assistedChanges": 0,
                        "baselineChanges": 0,
                        "basis": "observed forge timestamps compared by self-reported AI tagging",
                        "implementationHoursSaved": null,
                        "inputProvenance": "self_reported",
                        "kind": "modeled_counterfactual",
                        "netDeliveryGainHours": null,
                        "reviewOverheadHours": null,
                        "sample": {
                          "mergedChanges": 0,
                          "minimumPerGroup": 10,
                          "minimumTaggingCoverage": 0.1,
                          "taggedChanges": 0,
                          "taggingCoverage": null
                        },
                        "state": "unavailable",
                        "unavailableReason": "No merged self-reported AI-assisted changes have complete forge timestamps."
                      },
                      "models": {
                        "reason": "No aggregate provider windows are available to establish model usage.",
                        "state": "unavailable"
                      },
                      "providerWindows": {
                        "description": "Provider-reported aggregates are shown in their complete source reporting windows.",
                        "requestedPeriod": null,
                        "state": "unavailable",
                        "windows": []
                      },
                      "reportConfidence": {
                        "reason": "Report confidence requires a selected project and finite reporting period.",
                        "state": "unavailable"
                      },
                      "reviewOverhead": {
                        "reason": "The reader has no work-type dimension for review overhead; it will not infer one from aggregate usage or timestamps.",
                        "state": "unavailable"
                      },
                      "selfReportedAdoption": {
                        "assistedChanges": 0,
                        "assistedShare": null,
                        "conflictingChanges": 0,
                        "notAssistedChanges": 0,
                        "provenance": "self_reported",
                        "taggedChanges": 0,
                        "tools": []
                      },
                      "subtitle": "A modeled comparison of observed forge timestamps alongside aggregate provider data.",
                      "title": "AI delivery economics"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "adoption": {
                      "additionalProperties": false,
                      "properties": {
                        "assistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "basis": {
                          "const": "merged changes counted by self-reported AI tags",
                          "type": "string"
                        },
                        "byRepository": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "assistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "conflictingChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "mergedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notAssistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "repository": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tools": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "changes": {
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991,
                                      "type": "integer"
                                    },
                                    "tool": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tool",
                                    "changes"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "untaggedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mergedChanges",
                              "assistedChanges",
                              "notAssistedChanges",
                              "conflictingChanges",
                              "untaggedChanges",
                              "tools",
                              "repository"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "byWorkType": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "assistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "conflictingChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "mergedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notAssistedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "tools": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "changes": {
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991,
                                      "type": "integer"
                                    },
                                    "tool": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "tool",
                                    "changes"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "untaggedChanges": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "workType": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "const": "mixed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unlinked",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "mergedChanges",
                              "assistedChanges",
                              "notAssistedChanges",
                              "conflictingChanges",
                              "untaggedChanges",
                              "tools",
                              "workType"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "conflictingChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "mergedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "notAssistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "provenance": {
                          "const": "self_reported",
                          "type": "string"
                        },
                        "taggedEvidence": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "mergedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "reference": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "repository": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "signalSources": {
                                "items": {
                                  "enum": [
                                    "pr_label",
                                    "commit_trailer",
                                    "csv_column"
                                  ],
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "status": {
                                "enum": [
                                  "assisted",
                                  "not_assisted",
                                  "conflicting"
                                ],
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tools": {
                                "items": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "workItemKeys": {
                                "items": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "workType": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "const": "mixed",
                                    "type": "string"
                                  },
                                  {
                                    "const": "unlinked",
                                    "type": "string"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "reference",
                              "title",
                              "repository",
                              "url",
                              "mergedAt",
                              "status",
                              "workType",
                              "workItemKeys",
                              "signalSources",
                              "tools"
                            ],
                            "type": "object"
                          },
                          "maxItems": 100,
                          "type": "array"
                        },
                        "taggedEvidenceTotal": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "tools": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "changes": {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              "tool": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "tool",
                              "changes"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "untaggedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "workTypeLinks": {
                          "additionalProperties": false,
                          "properties": {
                            "byOrigin": {
                              "additionalProperties": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "propertyNames": {
                                "enum": [
                                  "connector",
                                  "heuristic",
                                  "manual"
                                ],
                                "type": "string"
                              },
                              "required": [
                                "connector",
                                "heuristic",
                                "manual"
                              ],
                              "type": "object"
                            },
                            "linkedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "linkedChanges",
                            "byOrigin"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "mergedChanges",
                        "assistedChanges",
                        "notAssistedChanges",
                        "conflictingChanges",
                        "untaggedChanges",
                        "tools",
                        "provenance",
                        "basis",
                        "byRepository",
                        "byWorkType",
                        "workTypeLinks",
                        "taggedEvidence",
                        "taggedEvidenceTotal"
                      ],
                      "type": "object"
                    },
                    "comparison": {
                      "additionalProperties": false,
                      "properties": {
                        "assistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "baselineChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "basis": {
                          "const": "observed forge timestamps compared by self-reported AI tagging",
                          "type": "string"
                        },
                        "implementationHoursSaved": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "inputProvenance": {
                          "enum": [
                            "self_reported",
                            "vendor_reported",
                            "modeled",
                            "provider_export",
                            "user_declared"
                          ],
                          "type": "string"
                        },
                        "kind": {
                          "const": "modeled_counterfactual",
                          "type": "string"
                        },
                        "netDeliveryGainHours": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "reviewOverheadHours": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "sample": {
                          "additionalProperties": false,
                          "properties": {
                            "mergedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "minimumPerGroup": {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            "minimumTaggingCoverage": {
                              "maximum": 1,
                              "minimum": 0,
                              "type": "number"
                            },
                            "taggedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "taggingCoverage": {
                              "anyOf": [
                                {
                                  "maximum": 1,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "mergedChanges",
                            "taggedChanges",
                            "taggingCoverage",
                            "minimumPerGroup",
                            "minimumTaggingCoverage"
                          ],
                          "type": "object"
                        },
                        "state": {
                          "enum": [
                            "available",
                            "unavailable",
                            "insufficient_sample"
                          ],
                          "type": "string"
                        },
                        "unavailableReason": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "kind",
                        "basis",
                        "inputProvenance",
                        "assistedChanges",
                        "baselineChanges",
                        "implementationHoursSaved",
                        "reviewOverheadHours",
                        "netDeliveryGainHours",
                        "unavailableReason",
                        "sample"
                      ],
                      "type": "object"
                    },
                    "models": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "reason": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "state": {
                              "const": "unavailable",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "reason": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "state": {
                              "const": "reported_empty",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "currency": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "models": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "basis": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "metric": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "model": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "provenance": {
                                          "enum": [
                                            "vendor_reported",
                                            "provider_export",
                                            "user_declared"
                                          ],
                                          "type": "string"
                                        },
                                        "unit": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "model",
                                        "metric",
                                        "value",
                                        "unit",
                                        "provenance",
                                        "basis"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "originId": {
                                    "type": "string"
                                  },
                                  "provenance": {
                                    "enum": [
                                      "self_reported",
                                      "vendor_reported",
                                      "modeled",
                                      "provider_export",
                                      "user_declared"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "copilot",
                                      "cursor",
                                      "claude_code",
                                      "claude_enterprise",
                                      "codex",
                                      "gemini",
                                      "csv"
                                    ],
                                    "type": "string"
                                  },
                                  "sourceScope": {
                                    "type": "string"
                                  },
                                  "windowEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "windowStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source",
                                  "windowStart",
                                  "windowEnd",
                                  "models"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "state": {
                              "const": "available",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "data"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "providerWindows": {
                      "additionalProperties": false,
                      "properties": {
                        "description": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "requestedPeriod": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "end": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "mode": {
                                  "const": "full_overlapping_windows",
                                  "type": "string"
                                },
                                "start": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "timeZone": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "start",
                                "end",
                                "timeZone",
                                "mode"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "enum": [
                            "available",
                            "reported_empty",
                            "unavailable"
                          ],
                          "type": "string"
                        },
                        "windows": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "acceptedLines": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "acceptedLineWindows": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "value": {
                                      "type": "number"
                                    },
                                    "windowEnd": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "windowStart": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "windowStart",
                                    "windowEnd",
                                    "value"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lineAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "originId": {
                                "type": "string"
                              },
                              "provenance": {
                                "enum": [
                                  "self_reported",
                                  "vendor_reported",
                                  "modeled",
                                  "provider_export",
                                  "user_declared"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "copilot",
                                  "cursor",
                                  "claude_code",
                                  "claude_enterprise",
                                  "codex",
                                  "gemini",
                                  "csv"
                                ],
                                "type": "string"
                              },
                              "sourceScope": {
                                "type": "string"
                              },
                              "suggestedLines": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tabAcceptanceRate": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tabAccepts": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tabSuggestions": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "basis": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "provenance": {
                                        "enum": [
                                          "vendor_reported",
                                          "provider_export",
                                          "user_declared"
                                        ],
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "value",
                                      "provenance",
                                      "basis"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "unavailable": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "fact": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "reason": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "fact",
                                    "reason"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "windowEnd": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "windowStart": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "source",
                              "windowStart",
                              "windowEnd",
                              "acceptedLines",
                              "suggestedLines",
                              "lineAcceptanceRate",
                              "tabAccepts",
                              "tabSuggestions",
                              "tabAcceptanceRate",
                              "acceptedLineWindows",
                              "unavailable"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "state",
                        "description",
                        "requestedPeriod",
                        "windows"
                      ],
                      "type": "object"
                    },
                    "reportConfidence": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "confidence": {
                              "additionalProperties": false,
                              "properties": {
                                "hints": {
                                  "default": [],
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "label": {
                                  "default": "Not measured",
                                  "enum": [
                                    "High",
                                    "Medium",
                                    "Low",
                                    "Not measured"
                                  ],
                                  "type": "string"
                                },
                                "score": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "signals": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "evidence": {
                                        "additionalProperties": false,
                                        "default": {
                                          "denominator": null,
                                          "numerator": null,
                                          "query": "Evidence path was not recorded in this historical snapshot."
                                        },
                                        "properties": {
                                          "denominator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "numerator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "query": {
                                            "default": "Evidence path was not recorded in this historical snapshot.",
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "numerator",
                                          "denominator",
                                          "query"
                                        ],
                                        "type": "object"
                                      },
                                      "id": {
                                        "enum": [
                                          "prs_linked",
                                          "items_mapped",
                                          "meetings_tagged",
                                          "rate_card",
                                          "ai_tagging",
                                          "release_evidence",
                                          "manual_entry_share",
                                          "freshness",
                                          "assumptions"
                                        ],
                                        "type": "string"
                                      },
                                      "label": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "note": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "pct": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "weight": {
                                        "default": 1,
                                        "exclusiveMinimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "pct",
                                      "weight",
                                      "contribution",
                                      "evidence",
                                      "note"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "score",
                                "label",
                                "signals",
                                "hints"
                              ],
                              "type": "object"
                            },
                            "state": {
                              "const": "available",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "confidence"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "reason": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "state": {
                              "const": "unavailable",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "reviewOverhead": {
                      "additionalProperties": false,
                      "properties": {
                        "reason": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "const": "unavailable",
                          "type": "string"
                        }
                      },
                      "required": [
                        "state",
                        "reason"
                      ],
                      "type": "object"
                    },
                    "selfReportedAdoption": {
                      "additionalProperties": false,
                      "properties": {
                        "assistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "assistedShare": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "conflictingChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "notAssistedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "provenance": {
                          "const": "self_reported",
                          "type": "string"
                        },
                        "taggedChanges": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "tools": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "provenance",
                        "taggedChanges",
                        "assistedChanges",
                        "notAssistedChanges",
                        "conflictingChanges",
                        "assistedShare",
                        "tools"
                      ],
                      "type": "object"
                    },
                    "subtitle": {
                      "const": "A modeled comparison of observed forge timestamps alongside aggregate provider data.",
                      "type": "string"
                    },
                    "title": {
                      "const": "AI delivery economics",
                      "type": "string"
                    }
                  },
                  "required": [
                    "title",
                    "subtitle",
                    "comparison",
                    "selfReportedAdoption",
                    "providerWindows",
                    "models",
                    "reviewOverhead",
                    "adoption",
                    "reportConfidence"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read interpreted AI economics",
        "tags": [
          "intelligence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "ai_economics.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "ai-economics:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/assumptions": {
      "get": {
        "description": "Read every registered assumption for a reporting period and optional customer/project. Original defaults, evidence availability, options, confirmed/rectified versions, units, impacts and coverage remain distinct. No evidence is silently confirmed. Exact scope, current creator action/dataset access and tenant ownership apply. Identical successful retries return the original response without extra history or audit. Revisions affect applicable future/current calculations; stored source evidence and historical report snapshots are never rewritten.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nReporting and effective intervals are ordered; tz is a valid IANA time zone.\n\nManual values have no date range; date_range values agree with the ordered range.\n\nsupersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.\n\nRationale is optional in the existing domain contract; provide a meaningful reason for traceability.",
        "operationId": "assumptions.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-31",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL assumption workflow",
                    "value": {
                      "canWrite": true,
                      "coverage": {
                        "completenessPct": 0,
                        "freshestAt": null,
                        "settled": 0,
                        "stalestAt": null,
                        "stalestDays": null,
                        "total": 6
                      },
                      "entries": [
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "financial",
                          "classificationLabel": "Financial value",
                          "dataAvailable": true,
                          "description": "Role-based blended rate used to estimate Oct 1 – Oct 31, 2026 delivery investment. Per-engineer rates would lift precision.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "coin",
                          "id": "cost-basis",
                          "impacts": [
                            "period_spend",
                            "invoice_defense"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep per-person rates, role rates otherwise",
                              "method": "person_then_role",
                              "range": null,
                              "value": "$165/h"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Cost estimate basis",
                          "unitOrMethod": "person_then_role",
                          "updatedAt": null,
                          "value": "$165/h",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "quantity",
                          "classificationLabel": "Quantity",
                          "dataAvailable": true,
                          "description": "Items added after the Jan 1, 2026 scope lock count as scope expansion for this report.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "check",
                          "id": "scope-baseline",
                          "impacts": [
                            "scope_valuation"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the engagement start as the scope lock",
                              "method": "engagement_start",
                              "range": null,
                              "value": "1 work items"
                            },
                            {
                              "label": "Use the reporting period start",
                              "method": "period_start",
                              "range": null,
                              "value": "3 work items"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Scope baseline",
                          "unitOrMethod": "engagement_start",
                          "updatedAt": null,
                          "value": "1 work items",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "percentage",
                          "classificationLabel": "Percentage",
                          "dataAvailable": false,
                          "description": "Calendar events with explicit project tags only. Untagged meetings are excluded from the coordination estimate.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "meeting-attribution",
                          "impacts": [
                            "coordination_cost"
                          ],
                          "note": "No calendar events were synced for this period, so coordination cost is counted from nothing.",
                          "options": [
                            {
                              "label": "Keep meetings tagged to this project",
                              "method": "project_tagged",
                              "range": null,
                              "value": "No meetings synced"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Meeting attribution",
                          "unitOrMethod": "project_tagged",
                          "updatedAt": null,
                          "value": "No meetings synced",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": false,
                          "description": "Uses self-reported labels and trailers to identify AI-assisted changes. Explicit AI tags are recommended.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "spark",
                          "id": "ai-attribution",
                          "impacts": [
                            "ai_economics",
                            "ai_tagging_signal"
                          ],
                          "note": "No merged change in this period carries an AI signal, so the AI figures rest on nothing yet.",
                          "options": [
                            {
                              "label": "Keep self-reported labels and trailers",
                              "method": "self_reported",
                              "range": null,
                              "value": "Self-reported labels and trailers"
                            },
                            {
                              "label": "Use explicit AI tool tags only",
                              "method": "explicit_tools_only",
                              "range": null,
                              "value": "Explicit AI tool tags only"
                            },
                            {
                              "label": "Mark as manual review required",
                              "method": "manual_review",
                              "range": null,
                              "value": "Manual review required"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "AI attribution",
                          "unitOrMethod": "self_reported",
                          "updatedAt": null,
                          "value": "Self-reported labels and trailers",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "date",
                          "classificationLabel": "Date range",
                          "dataAvailable": true,
                          "description": "The active report window is Oct 1 – Oct 31, 2026, inclusive.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "cal",
                          "id": "reporting-period",
                          "impacts": [
                            "reporting_interval"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Use the active reporting range",
                              "method": "active_range",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-10-01"
                              },
                              "value": "Oct 1 – Oct 31, 2026"
                            },
                            {
                              "label": "Use the engagement to date",
                              "method": "engagement_to_date",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-01-01"
                              },
                              "value": "Jan 1 – Oct 31, 2026"
                            }
                          ],
                          "range": {
                            "end": "2026-10-31",
                            "start": "2026-10-01"
                          },
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Reporting period",
                          "unitOrMethod": "active_range",
                          "updatedAt": null,
                          "value": "Oct 1 – Oct 31, 2026",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": true,
                          "description": "How the Oct 1 – Oct 31, 2026 team estimate from role bands is spread across tracked work items. Amounts stay estimates, never actual spend.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "work-cost-allocation",
                          "impacts": [
                            "work_item_cost"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the team estimate without allocating it",
                              "method": "not_allocated",
                              "range": null,
                              "value": "Team estimate only"
                            },
                            {
                              "label": "Allocate the team estimate by story points",
                              "method": "points_weighted",
                              "range": null,
                              "value": "1 of 1 items pointed"
                            },
                            {
                              "label": "Allocate the team estimate by original time estimates",
                              "method": "estimate_hours_weighted",
                              "range": null,
                              "value": "0 of 1 items with time estimates"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Work-item cost allocation",
                          "unitOrMethod": "not_allocated",
                          "updatedAt": null,
                          "value": "Team estimate only",
                          "versionId": null
                        }
                      ],
                      "period": {
                        "end": "2026-10-31",
                        "start": "2026-10-01",
                        "timeZone": "UTC"
                      },
                      "scope": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "projectId": "11111111-1111-4111-8111-111111111111"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canWrite": {
                      "type": "boolean"
                    },
                    "coverage": {
                      "additionalProperties": false,
                      "properties": {
                        "completenessPct": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "freshestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settled": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "stalestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stalestDays": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "total": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total",
                        "settled",
                        "completenessPct",
                        "stalestDays",
                        "freshestAt",
                        "stalestAt"
                      ],
                      "type": "object"
                    },
                    "entries": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "allowManual": {
                            "default": true,
                            "type": "boolean"
                          },
                          "classification": {
                            "enum": [
                              "financial",
                              "quantity",
                              "percentage",
                              "nominal",
                              "date"
                            ],
                            "type": "string"
                          },
                          "classificationLabel": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "dataAvailable": {
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          },
                          "effectiveFrom": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "effectiveTo": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "icon": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "enum": [
                              "cost-basis",
                              "scope-baseline",
                              "meeting-attribution",
                              "ai-attribution",
                              "reporting-period",
                              "work-cost-allocation"
                            ],
                            "type": "string"
                          },
                          "impacts": {
                            "items": {
                              "enum": [
                                "period_spend",
                                "invoice_defense",
                                "scope_valuation",
                                "coordination_cost",
                                "meetings_tagged_signal",
                                "ai_economics",
                                "ai_tagging_signal",
                                "reporting_interval",
                                "work_item_cost"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "options": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "label": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "method": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "range": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "end": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "start": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "start",
                                        "end"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "value": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value",
                                "method",
                                "range"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "range": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "end": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "start": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "start",
                                  "end"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "enum": [
                              "default",
                              "option",
                              "manual",
                              "date_range"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "needs_verification",
                              "confirmed",
                              "rectified"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "unitOrMethod": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "versionId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "classification",
                          "classificationLabel",
                          "icon",
                          "value",
                          "unitOrMethod",
                          "source",
                          "status",
                          "options",
                          "effectiveFrom",
                          "effectiveTo",
                          "allowManual",
                          "rationale",
                          "versionId",
                          "updatedAt",
                          "actorName",
                          "dataAvailable",
                          "note",
                          "range",
                          "impacts"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "end": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "start": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "timeZone"
                      ],
                      "type": "object"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "clientId",
                        "projectId"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "period",
                    "scope",
                    "canWrite",
                    "coverage",
                    "entries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Inspect current assumptions",
        "tags": [
          "assumptions"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "assumptions.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Reporting and effective intervals are ordered; tz is a valid IANA time zone.",
            "Manual values have no date range; date_range values agree with the ordered range.",
            "supersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.",
            "Rationale is optional in the existing domain contract; provide a meaningful reason for traceability."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "assumptions:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/assumptions/{assumptionId}/confirm": {
      "post": {
        "description": "Agree to the current value only when its evidence is available. Supply the observed versionId as supersedesId, or null for the original value. Missing evidence, stale version or changed options returns 409. A single-period override remains limited to that period. Confirmation appends a version and audit; it cannot invent missing evidence. Exact scope, current creator action/dataset access and tenant ownership apply. Identical successful retries return the original response without extra history or audit. Revisions affect applicable future/current calculations; stored source evidence and historical report snapshots are never rewritten.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nReporting and effective intervals are ordered; tz is a valid IANA time zone.\n\nManual values have no date range; date_range values agree with the ordered range.\n\nsupersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.\n\nRationale is optional in the existing domain contract; provide a meaningful reason for traceability.",
        "operationId": "assumptions.confirm",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "reporting-period",
            "in": "path",
            "name": "assumptionId",
            "required": true,
            "schema": {
              "enum": [
                "cost-basis",
                "scope-baseline",
                "meeting-attribution",
                "ai-attribution",
                "reporting-period",
                "work-cost-allocation"
              ],
              "type": "string"
            }
          },
          {
            "example": "example-assumptions.confirm",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "end": "2026-10-31",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "rationale": "Confirm the agreed reporting window",
                    "start": "2026-10-01",
                    "supersedesId": null,
                    "tz": "UTC"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "end": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "rationale": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "start": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "tz": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "start",
                  "end",
                  "tz"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL assumption workflow",
                    "value": {
                      "canWrite": true,
                      "coverage": {
                        "completenessPct": 17,
                        "freshestAt": "2026-10-01T07:48:09.083Z",
                        "settled": 1,
                        "stalestAt": "2026-10-01T07:48:09.083Z",
                        "stalestDays": 0,
                        "total": 6
                      },
                      "entries": [
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "financial",
                          "classificationLabel": "Financial value",
                          "dataAvailable": true,
                          "description": "Role-based blended rate used to estimate Oct 1 – Oct 31, 2026 delivery investment. Per-engineer rates would lift precision.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "coin",
                          "id": "cost-basis",
                          "impacts": [
                            "period_spend",
                            "invoice_defense"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep per-person rates, role rates otherwise",
                              "method": "person_then_role",
                              "range": null,
                              "value": "$165/h"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Cost estimate basis",
                          "unitOrMethod": "person_then_role",
                          "updatedAt": null,
                          "value": "$165/h",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "quantity",
                          "classificationLabel": "Quantity",
                          "dataAvailable": true,
                          "description": "Items added after the Jan 1, 2026 scope lock count as scope expansion for this report.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "check",
                          "id": "scope-baseline",
                          "impacts": [
                            "scope_valuation"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the engagement start as the scope lock",
                              "method": "engagement_start",
                              "range": null,
                              "value": "1 work items"
                            },
                            {
                              "label": "Use the reporting period start",
                              "method": "period_start",
                              "range": null,
                              "value": "3 work items"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Scope baseline",
                          "unitOrMethod": "engagement_start",
                          "updatedAt": null,
                          "value": "1 work items",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "percentage",
                          "classificationLabel": "Percentage",
                          "dataAvailable": false,
                          "description": "Calendar events with explicit project tags only. Untagged meetings are excluded from the coordination estimate.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "meeting-attribution",
                          "impacts": [
                            "coordination_cost"
                          ],
                          "note": "No calendar events were synced for this period, so coordination cost is counted from nothing.",
                          "options": [
                            {
                              "label": "Keep meetings tagged to this project",
                              "method": "project_tagged",
                              "range": null,
                              "value": "No meetings synced"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Meeting attribution",
                          "unitOrMethod": "project_tagged",
                          "updatedAt": null,
                          "value": "No meetings synced",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": false,
                          "description": "Uses self-reported labels and trailers to identify AI-assisted changes. Explicit AI tags are recommended.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "spark",
                          "id": "ai-attribution",
                          "impacts": [
                            "ai_economics",
                            "ai_tagging_signal"
                          ],
                          "note": "No merged change in this period carries an AI signal, so the AI figures rest on nothing yet.",
                          "options": [
                            {
                              "label": "Keep self-reported labels and trailers",
                              "method": "self_reported",
                              "range": null,
                              "value": "Self-reported labels and trailers"
                            },
                            {
                              "label": "Use explicit AI tool tags only",
                              "method": "explicit_tools_only",
                              "range": null,
                              "value": "Explicit AI tool tags only"
                            },
                            {
                              "label": "Mark as manual review required",
                              "method": "manual_review",
                              "range": null,
                              "value": "Manual review required"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "AI attribution",
                          "unitOrMethod": "self_reported",
                          "updatedAt": null,
                          "value": "Self-reported labels and trailers",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "date",
                          "classificationLabel": "Date range",
                          "dataAvailable": true,
                          "description": "The active report window is Oct 1 – Oct 31, 2026, inclusive.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "cal",
                          "id": "reporting-period",
                          "impacts": [
                            "reporting_interval"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Use the active reporting range",
                              "method": "active_range",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-10-01"
                              },
                              "value": "Oct 1 – Oct 31, 2026"
                            },
                            {
                              "label": "Use the engagement to date",
                              "method": "engagement_to_date",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-01-01"
                              },
                              "value": "Jan 1 – Oct 31, 2026"
                            }
                          ],
                          "range": {
                            "end": "2026-10-31",
                            "start": "2026-10-01"
                          },
                          "rationale": "Confirm the agreed reporting window",
                          "source": "default",
                          "status": "confirmed",
                          "title": "Reporting period",
                          "unitOrMethod": "active_range",
                          "updatedAt": "2026-10-01T07:48:09.083Z",
                          "value": "Oct 1 – Oct 31, 2026",
                          "versionId": "00000000-0000-4000-8000-000000000003"
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": true,
                          "description": "How the Oct 1 – Oct 31, 2026 team estimate from role bands is spread across tracked work items. Amounts stay estimates, never actual spend.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "work-cost-allocation",
                          "impacts": [
                            "work_item_cost"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the team estimate without allocating it",
                              "method": "not_allocated",
                              "range": null,
                              "value": "Team estimate only"
                            },
                            {
                              "label": "Allocate the team estimate by story points",
                              "method": "points_weighted",
                              "range": null,
                              "value": "1 of 1 items pointed"
                            },
                            {
                              "label": "Allocate the team estimate by original time estimates",
                              "method": "estimate_hours_weighted",
                              "range": null,
                              "value": "0 of 1 items with time estimates"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Work-item cost allocation",
                          "unitOrMethod": "not_allocated",
                          "updatedAt": null,
                          "value": "Team estimate only",
                          "versionId": null
                        }
                      ],
                      "period": {
                        "end": "2026-10-31",
                        "start": "2026-10-01",
                        "timeZone": "UTC"
                      },
                      "scope": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "projectId": "11111111-1111-4111-8111-111111111111"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canWrite": {
                      "type": "boolean"
                    },
                    "coverage": {
                      "additionalProperties": false,
                      "properties": {
                        "completenessPct": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "freshestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settled": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "stalestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stalestDays": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "total": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total",
                        "settled",
                        "completenessPct",
                        "stalestDays",
                        "freshestAt",
                        "stalestAt"
                      ],
                      "type": "object"
                    },
                    "entries": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "allowManual": {
                            "default": true,
                            "type": "boolean"
                          },
                          "classification": {
                            "enum": [
                              "financial",
                              "quantity",
                              "percentage",
                              "nominal",
                              "date"
                            ],
                            "type": "string"
                          },
                          "classificationLabel": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "dataAvailable": {
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          },
                          "effectiveFrom": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "effectiveTo": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "icon": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "enum": [
                              "cost-basis",
                              "scope-baseline",
                              "meeting-attribution",
                              "ai-attribution",
                              "reporting-period",
                              "work-cost-allocation"
                            ],
                            "type": "string"
                          },
                          "impacts": {
                            "items": {
                              "enum": [
                                "period_spend",
                                "invoice_defense",
                                "scope_valuation",
                                "coordination_cost",
                                "meetings_tagged_signal",
                                "ai_economics",
                                "ai_tagging_signal",
                                "reporting_interval",
                                "work_item_cost"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "options": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "label": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "method": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "range": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "end": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "start": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "start",
                                        "end"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "value": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value",
                                "method",
                                "range"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "range": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "end": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "start": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "start",
                                  "end"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "enum": [
                              "default",
                              "option",
                              "manual",
                              "date_range"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "needs_verification",
                              "confirmed",
                              "rectified"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "unitOrMethod": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "versionId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "classification",
                          "classificationLabel",
                          "icon",
                          "value",
                          "unitOrMethod",
                          "source",
                          "status",
                          "options",
                          "effectiveFrom",
                          "effectiveTo",
                          "allowManual",
                          "rationale",
                          "versionId",
                          "updatedAt",
                          "actorName",
                          "dataAvailable",
                          "note",
                          "range",
                          "impacts"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "end": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "start": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "timeZone"
                      ],
                      "type": "object"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "clientId",
                        "projectId"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "period",
                    "scope",
                    "canWrite",
                    "coverage",
                    "entries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Confirm the current evidenced value",
        "tags": [
          "assumptions"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "assumptions.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Reporting and effective intervals are ordered; tz is a valid IANA time zone.",
            "Manual values have no date range; date_range values agree with the ordered range.",
            "supersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.",
            "Rationale is optional in the existing domain contract; provide a meaningful reason for traceability."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "assumptions:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/assumptions/{assumptionId}/history": {
      "get": {
        "description": "Read the existing append-only versions for one registry identifier and tenant scope, with author, rationale, effective interval and supersedes chain. No pagination is offered. A registry identifier names an assumption type, not a version UUID. Exact scope, current creator action/dataset access and tenant ownership apply. Identical successful retries return the original response without extra history or audit. Revisions affect applicable future/current calculations; stored source evidence and historical report snapshots are never rewritten.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nReporting and effective intervals are ordered; tz is a valid IANA time zone.\n\nManual values have no date range; date_range values agree with the ordered range.\n\nsupersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.\n\nRationale is optional in the existing domain contract; provide a meaningful reason for traceability.",
        "operationId": "assumptions.history",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "cost-basis",
            "in": "path",
            "name": "assumptionId",
            "required": true,
            "schema": {
              "enum": [
                "cost-basis",
                "scope-baseline",
                "meeting-attribution",
                "ai-attribution",
                "reporting-period",
                "work-cost-allocation"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL assumption workflow",
                    "value": {
                      "versions": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000005",
                          "assumptionId": "cost-basis",
                          "clientId": "22222222-2222-4222-8222-222222222222",
                          "createdAt": "2026-10-01T07:48:09.127Z",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "id": "00000000-0000-4000-8000-000000000004",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "rationale": "Use the agreed engagement hourly rate",
                          "source": "manual",
                          "status": "rectified",
                          "supersedesId": null,
                          "unitOrMethod": "manual",
                          "value": "125/h"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "versions": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "anyOf": [
                              {
                                "maxLength": 200,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "assumptionId": {
                            "enum": [
                              "cost-basis",
                              "scope-baseline",
                              "meeting-attribution",
                              "ai-attribution",
                              "reporting-period",
                              "work-cost-allocation"
                            ],
                            "type": "string"
                          },
                          "clientId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "effectiveFrom": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "effectiveTo": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "projectId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rationale": {
                            "anyOf": [
                              {
                                "maxLength": 1000,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "enum": [
                              "default",
                              "option",
                              "manual",
                              "date_range"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "needs_verification",
                              "confirmed",
                              "rectified"
                            ],
                            "type": "string"
                          },
                          "supersedesId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unitOrMethod": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "value": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "assumptionId",
                          "clientId",
                          "projectId",
                          "value",
                          "unitOrMethod",
                          "source",
                          "effectiveFrom",
                          "effectiveTo",
                          "status",
                          "rationale",
                          "actorUserId",
                          "actorName",
                          "supersedesId",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "versions"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read append-only assumption history",
        "tags": [
          "assumptions"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "assumptions.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Reporting and effective intervals are ordered; tz is a valid IANA time zone.",
            "Manual values have no date range; date_range values agree with the ordered range.",
            "supersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.",
            "Rationale is optional in the existing domain contract; provide a meaningful reason for traceability."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "assumptions:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/assumptions/{assumptionId}/rectify": {
      "post": {
        "description": "Append a correction using an offered option, a manual value or a date_range. Manual values cannot carry range; date_range needs ordered boundaries and the exact shared formatted value. Hourly rates must match the engagement currency; allocation basis must use an offered option. Options are revalidated against current evidence. appliesTo chooses a default or this-period override; do not combine it with explicit effective bounds. Existing override carry-forward semantics and rationale remain unchanged. Exact scope, current creator action/dataset access and tenant ownership apply. Identical successful retries return the original response without extra history or audit. Revisions affect applicable future/current calculations; stored source evidence and historical report snapshots are never rewritten.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nReporting and effective intervals are ordered; tz is a valid IANA time zone.\n\nManual values have no date range; date_range values agree with the ordered range.\n\nsupersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.\n\nRationale is optional in the existing domain contract; provide a meaningful reason for traceability.",
        "operationId": "assumptions.rectify",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "cost-basis",
            "in": "path",
            "name": "assumptionId",
            "required": true,
            "schema": {
              "enum": [
                "cost-basis",
                "scope-baseline",
                "meeting-attribution",
                "ai-attribution",
                "reporting-period",
                "work-cost-allocation"
              ],
              "type": "string"
            }
          },
          {
            "example": "example-assumptions.rectify",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "end": "2026-10-31",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "rationale": "Use the agreed engagement hourly rate",
                    "source": "manual",
                    "start": "2026-10-01",
                    "supersedesId": null,
                    "tz": "UTC",
                    "value": "125/h"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "appliesTo": {
                    "enum": [
                      "every_period",
                      "period_only",
                      "from_period"
                    ],
                    "type": "string"
                  },
                  "clientId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "effectiveFrom": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "effectiveTo": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "end": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "method": {
                    "maxLength": 80,
                    "minLength": 1,
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "range": {
                    "properties": {
                      "end": {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      "start": {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "type": "object"
                  },
                  "rationale": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "source": {
                    "enum": [
                      "option",
                      "manual",
                      "date_range"
                    ],
                    "type": "string"
                  },
                  "start": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "tz": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "value": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "start",
                  "end",
                  "tz",
                  "value",
                  "source"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL assumption workflow",
                    "value": {
                      "canWrite": true,
                      "coverage": {
                        "completenessPct": 33,
                        "freshestAt": "2026-10-01T07:48:09.127Z",
                        "settled": 2,
                        "stalestAt": "2026-10-01T07:48:09.083Z",
                        "stalestDays": 0,
                        "total": 6
                      },
                      "entries": [
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "financial",
                          "classificationLabel": "Financial value",
                          "dataAvailable": true,
                          "description": "Role-based blended rate used to estimate Oct 1 – Oct 31, 2026 delivery investment. Per-engineer rates would lift precision.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "coin",
                          "id": "cost-basis",
                          "impacts": [
                            "period_spend",
                            "invoice_defense"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep per-person rates, role rates otherwise",
                              "method": "person_then_role",
                              "range": null,
                              "value": "$165/h"
                            }
                          ],
                          "range": null,
                          "rationale": "Use the agreed engagement hourly rate",
                          "source": "manual",
                          "status": "rectified",
                          "title": "Cost estimate basis",
                          "unitOrMethod": "manual",
                          "updatedAt": "2026-10-01T07:48:09.127Z",
                          "value": "125/h",
                          "versionId": "00000000-0000-4000-8000-000000000004"
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "quantity",
                          "classificationLabel": "Quantity",
                          "dataAvailable": true,
                          "description": "Items added after the Jan 1, 2026 scope lock count as scope expansion for this report.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "check",
                          "id": "scope-baseline",
                          "impacts": [
                            "scope_valuation"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the engagement start as the scope lock",
                              "method": "engagement_start",
                              "range": null,
                              "value": "1 work items"
                            },
                            {
                              "label": "Use the reporting period start",
                              "method": "period_start",
                              "range": null,
                              "value": "3 work items"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Scope baseline",
                          "unitOrMethod": "engagement_start",
                          "updatedAt": null,
                          "value": "1 work items",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "percentage",
                          "classificationLabel": "Percentage",
                          "dataAvailable": false,
                          "description": "Calendar events with explicit project tags only. Untagged meetings are excluded from the coordination estimate.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "meeting-attribution",
                          "impacts": [
                            "coordination_cost"
                          ],
                          "note": "No calendar events were synced for this period, so coordination cost is counted from nothing.",
                          "options": [
                            {
                              "label": "Keep meetings tagged to this project",
                              "method": "project_tagged",
                              "range": null,
                              "value": "No meetings synced"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Meeting attribution",
                          "unitOrMethod": "project_tagged",
                          "updatedAt": null,
                          "value": "No meetings synced",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": false,
                          "description": "Uses self-reported labels and trailers to identify AI-assisted changes. Explicit AI tags are recommended.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "spark",
                          "id": "ai-attribution",
                          "impacts": [
                            "ai_economics",
                            "ai_tagging_signal"
                          ],
                          "note": "No merged change in this period carries an AI signal, so the AI figures rest on nothing yet.",
                          "options": [
                            {
                              "label": "Keep self-reported labels and trailers",
                              "method": "self_reported",
                              "range": null,
                              "value": "Self-reported labels and trailers"
                            },
                            {
                              "label": "Use explicit AI tool tags only",
                              "method": "explicit_tools_only",
                              "range": null,
                              "value": "Explicit AI tool tags only"
                            },
                            {
                              "label": "Mark as manual review required",
                              "method": "manual_review",
                              "range": null,
                              "value": "Manual review required"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "AI attribution",
                          "unitOrMethod": "self_reported",
                          "updatedAt": null,
                          "value": "Self-reported labels and trailers",
                          "versionId": null
                        },
                        {
                          "actorName": null,
                          "allowManual": true,
                          "classification": "date",
                          "classificationLabel": "Date range",
                          "dataAvailable": true,
                          "description": "The active report window is Oct 1 – Oct 31, 2026, inclusive.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "cal",
                          "id": "reporting-period",
                          "impacts": [
                            "reporting_interval"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Use the active reporting range",
                              "method": "active_range",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-10-01"
                              },
                              "value": "Oct 1 – Oct 31, 2026"
                            },
                            {
                              "label": "Use the engagement to date",
                              "method": "engagement_to_date",
                              "range": {
                                "end": "2026-10-31",
                                "start": "2026-01-01"
                              },
                              "value": "Jan 1 – Oct 31, 2026"
                            }
                          ],
                          "range": {
                            "end": "2026-10-31",
                            "start": "2026-10-01"
                          },
                          "rationale": "Confirm the agreed reporting window",
                          "source": "default",
                          "status": "confirmed",
                          "title": "Reporting period",
                          "unitOrMethod": "active_range",
                          "updatedAt": "2026-10-01T07:48:09.083Z",
                          "value": "Oct 1 – Oct 31, 2026",
                          "versionId": "00000000-0000-4000-8000-000000000003"
                        },
                        {
                          "actorName": null,
                          "allowManual": false,
                          "classification": "nominal",
                          "classificationLabel": "Nominal value",
                          "dataAvailable": true,
                          "description": "How the Oct 1 – Oct 31, 2026 team estimate from role bands is spread across tracked work items. Amounts stay estimates, never actual spend.",
                          "effectiveFrom": "2026-10-01",
                          "effectiveTo": null,
                          "icon": "gauge",
                          "id": "work-cost-allocation",
                          "impacts": [
                            "work_item_cost"
                          ],
                          "note": null,
                          "options": [
                            {
                              "label": "Keep the team estimate without allocating it",
                              "method": "not_allocated",
                              "range": null,
                              "value": "Team estimate only"
                            },
                            {
                              "label": "Allocate the team estimate by story points",
                              "method": "points_weighted",
                              "range": null,
                              "value": "1 of 1 items pointed"
                            },
                            {
                              "label": "Allocate the team estimate by original time estimates",
                              "method": "estimate_hours_weighted",
                              "range": null,
                              "value": "0 of 1 items with time estimates"
                            }
                          ],
                          "range": null,
                          "rationale": null,
                          "source": "default",
                          "status": "needs_verification",
                          "title": "Work-item cost allocation",
                          "unitOrMethod": "not_allocated",
                          "updatedAt": null,
                          "value": "Team estimate only",
                          "versionId": null
                        }
                      ],
                      "period": {
                        "end": "2026-10-31",
                        "start": "2026-10-01",
                        "timeZone": "UTC"
                      },
                      "scope": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "projectId": "11111111-1111-4111-8111-111111111111"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canWrite": {
                      "type": "boolean"
                    },
                    "coverage": {
                      "additionalProperties": false,
                      "properties": {
                        "completenessPct": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "freshestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settled": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "stalestAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stalestDays": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "total": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total",
                        "settled",
                        "completenessPct",
                        "stalestDays",
                        "freshestAt",
                        "stalestAt"
                      ],
                      "type": "object"
                    },
                    "entries": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "allowManual": {
                            "default": true,
                            "type": "boolean"
                          },
                          "classification": {
                            "enum": [
                              "financial",
                              "quantity",
                              "percentage",
                              "nominal",
                              "date"
                            ],
                            "type": "string"
                          },
                          "classificationLabel": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "dataAvailable": {
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          },
                          "effectiveFrom": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "effectiveTo": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "icon": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "enum": [
                              "cost-basis",
                              "scope-baseline",
                              "meeting-attribution",
                              "ai-attribution",
                              "reporting-period",
                              "work-cost-allocation"
                            ],
                            "type": "string"
                          },
                          "impacts": {
                            "items": {
                              "enum": [
                                "period_spend",
                                "invoice_defense",
                                "scope_valuation",
                                "coordination_cost",
                                "meetings_tagged_signal",
                                "ai_economics",
                                "ai_tagging_signal",
                                "reporting_interval",
                                "work_item_cost"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "options": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "label": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "method": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "range": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "end": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "start": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "start",
                                        "end"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "value": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value",
                                "method",
                                "range"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "range": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "end": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "start": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "start",
                                  "end"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {
                            "enum": [
                              "default",
                              "option",
                              "manual",
                              "date_range"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "needs_verification",
                              "confirmed",
                              "rectified"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "unitOrMethod": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "value": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "versionId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "classification",
                          "classificationLabel",
                          "icon",
                          "value",
                          "unitOrMethod",
                          "source",
                          "status",
                          "options",
                          "effectiveFrom",
                          "effectiveTo",
                          "allowManual",
                          "rationale",
                          "versionId",
                          "updatedAt",
                          "actorName",
                          "dataAvailable",
                          "note",
                          "range",
                          "impacts"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "end": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "start": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "timeZone"
                      ],
                      "type": "object"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "clientId",
                        "projectId"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "period",
                    "scope",
                    "canWrite",
                    "coverage",
                    "entries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Correct an assumption with a stated basis",
        "tags": [
          "assumptions"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "assumptions.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Reporting and effective intervals are ordered; tz is a valid IANA time zone.",
            "Manual values have no date range; date_range values agree with the ordered range.",
            "supersedesId must match the observed current head. Current evidence/options are rechecked under the assumption lock.",
            "Rationale is optional in the existing domain contract; provide a meaningful reason for traceability."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "assumptions:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/audit/events": {
      "get": {
        "description": "Read append-only audit events with search, eventType, connector, impact, actor, status, severity and quick filters. Comma-separated or repeated values are accepted. Optional client/project bounds apply to rows, headline totals and filter options. Date filters require start/end/tz together. Limit is 1–100 (default 50); pass nextCursor as cursor for the next page. Existing audit.read and payload-retention access rules apply on Free, Entry and Growth; no Enterprise-only gate is invented. This operation does not export or replay audit data. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.\n\nEach multi-value filter must satisfy the shared Audit Trail enum/value and list-count bounds after splitting comma-separated values.\n\nA cursor must refer to an event inside the current workspace and selected client/project dataset.",
        "operationId": "audit.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 160,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventType",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "connector",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "impact",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "severity",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "quick",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "items": {
                    "maxLength": 120,
                    "type": "string"
                  },
                  "maxItems": 16,
                  "type": "array"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": 1,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "available": {
                        "connectors": [
                          {
                            "count": 1,
                            "id": "hidden_connector",
                            "label": "hidden_connector"
                          }
                        ],
                        "eventTypes": [
                          {
                            "count": 1,
                            "id": "synthetic.hidden",
                            "label": "synthetic.hidden"
                          },
                          {
                            "count": 1,
                            "id": "synthetic.visible",
                            "label": "synthetic.visible"
                          }
                        ],
                        "impacts": [
                          {
                            "count": 1,
                            "id": "hidden impact",
                            "label": "hidden impact"
                          }
                        ]
                      },
                      "events": [
                        {
                          "action": "synthetic.hidden",
                          "actor": "hidden_connector",
                          "actorKind": "connector",
                          "clientId": null,
                          "clientName": null,
                          "connector": "hidden_connector",
                          "hasPayload": false,
                          "id": "00000000-0000-4000-8000-000000000007",
                          "impacts": [
                            {
                              "label": "hidden impact"
                            }
                          ],
                          "occurredAt": "2026-10-01T06:54:37.909Z",
                          "projectId": "00000000-0000-4000-8000-000000000006",
                          "projectName": "Hidden by selection",
                          "severity": "info",
                          "status": "success",
                          "target": "project"
                        },
                        {
                          "action": "synthetic.visible",
                          "actor": "Workspace member",
                          "actorKind": "user",
                          "clientId": "33333333-3333-4333-8333-333333333333",
                          "clientName": "Synthetic visible client",
                          "connector": null,
                          "hasPayload": false,
                          "id": "11111111-1111-4111-8111-111111111111",
                          "impacts": [],
                          "occurredAt": "2026-10-01T06:54:37.907Z",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "projectName": "Synthetic visible project",
                          "severity": "info",
                          "status": "success",
                          "target": "project"
                        }
                      ],
                      "headline": {
                        "dataQualityWarnings": 0,
                        "eventsToday": 2,
                        "failedSyncEvents": 0,
                        "lastFullSync": {
                          "occurredAt": null,
                          "state": "unavailable"
                        },
                        "recalculatedMetrics": 0
                      },
                      "nextCursor": null,
                      "summary": {
                        "changes": 0,
                        "exports": 0,
                        "failed": 0,
                        "total": 2
                      },
                      "total": 2
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "available": {
                      "additionalProperties": false,
                      "properties": {
                        "connectors": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "count"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "eventTypes": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "count"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "impacts": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "count"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "eventTypes",
                        "connectors",
                        "impacts"
                      ],
                      "type": "object"
                    },
                    "events": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "action": {
                            "maxLength": 160,
                            "minLength": 1,
                            "type": "string"
                          },
                          "actor": {
                            "maxLength": 160,
                            "minLength": 1,
                            "type": "string"
                          },
                          "actorApiKeyId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "actorKind": {
                            "enum": [
                              "user",
                              "connector",
                              "engine",
                              "scheduler"
                            ],
                            "type": "string"
                          },
                          "clientId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clientName": {
                            "anyOf": [
                              {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "connector": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "hasPayload": {
                            "type": "boolean"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impacts": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "label": {
                                  "maxLength": 160,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "level": {
                                  "enum": [
                                    "low",
                                    "medium",
                                    "high"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "occurredAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "projectId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "projectName": {
                            "anyOf": [
                              {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "info",
                              "warn",
                              "risk"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "success",
                              "warning",
                              "failed",
                              "pending"
                            ],
                            "type": "string"
                          },
                          "target": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "occurredAt",
                          "actor",
                          "actorKind",
                          "action",
                          "target",
                          "connector",
                          "clientId",
                          "projectId",
                          "clientName",
                          "projectName",
                          "status",
                          "severity",
                          "impacts",
                          "hasPayload"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "headline": {
                      "additionalProperties": false,
                      "properties": {
                        "dataQualityWarnings": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "eventsToday": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "failedSyncEvents": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "lastFullSync": {
                          "additionalProperties": false,
                          "properties": {
                            "occurredAt": {
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "enum": [
                                "available",
                                "unavailable"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "occurredAt"
                          ],
                          "type": "object"
                        },
                        "recalculatedMetrics": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "eventsToday",
                        "failedSyncEvents",
                        "recalculatedMetrics",
                        "dataQualityWarnings",
                        "lastFullSync"
                      ],
                      "type": "object"
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "summary": {
                      "additionalProperties": false,
                      "properties": {
                        "changes": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "exports": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "failed": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "total": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "total",
                        "failed",
                        "changes",
                        "exports"
                      ],
                      "type": "object"
                    },
                    "total": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor",
                    "total",
                    "summary",
                    "headline",
                    "available"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List filtered audit events",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "audit.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
            "Each multi-value filter must satisfy the shared Audit Trail enum/value and list-count bounds after splitting comma-separated values.",
            "A cursor must refer to an event inside the current workspace and selected client/project dataset."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "audit-trail:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/audit/events/{eventId}": {
      "get": {
        "description": "Inspect one tenant-owned audit event and its safe explanation and chain metadata. Event access and payload visibility use the same current role and retention preferences as the Audit Trail. Missing or foreign event IDs return the same 404. Frozen report replay remains privileged and no replay/export action is exposed by this GET. This is an individual resource with no pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "audit.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "eventId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "event": {
                        "action": "synthetic.visible",
                        "actor": "Workspace member",
                        "actorKind": "user",
                        "after": null,
                        "before": null,
                        "chain": [
                          {
                            "at": "2026-10-01T06:54:37.907Z",
                            "connector": null,
                            "detail": "Workspace member Â· success",
                            "id": "11111111-1111-4111-8111-111111111111",
                            "kind": "norm",
                            "sub": "project",
                            "title": "synthetic.visible"
                          }
                        ],
                        "clientId": "33333333-3333-4333-8333-333333333333",
                        "clientName": "Synthetic visible client",
                        "connector": null,
                        "explain": null,
                        "hasPayload": false,
                        "id": "11111111-1111-4111-8111-111111111111",
                        "impacts": [],
                        "occurredAt": "2026-10-01T06:54:37.907Z",
                        "payload": {},
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "projectName": "Synthetic visible project",
                        "related": [],
                        "severity": "info",
                        "status": "success",
                        "target": "project"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "event": {
                      "additionalProperties": false,
                      "properties": {
                        "action": {
                          "maxLength": 160,
                          "minLength": 1,
                          "type": "string"
                        },
                        "actor": {
                          "maxLength": 160,
                          "minLength": 1,
                          "type": "string"
                        },
                        "actorApiKeyId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "actorKind": {
                          "enum": [
                            "user",
                            "connector",
                            "engine",
                            "scheduler"
                          ],
                          "type": "string"
                        },
                        "after": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "before": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "chain": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "at": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "connector": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "detail": {
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "source",
                                  "norm",
                                  "link",
                                  "calc",
                                  "report"
                                ],
                                "type": "string"
                              },
                              "sub": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "at",
                              "sub",
                              "detail",
                              "kind",
                              "connector"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "clientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clientName": {
                          "anyOf": [
                            {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connector": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "explain": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "confidence": {
                                  "type": "string"
                                },
                                "confLevel": {
                                  "maximum": 1,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "deps": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "formula": {
                                  "type": "string"
                                },
                                "inputs": {
                                  "type": "string"
                                },
                                "output": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "inputs",
                                "output",
                                "formula",
                                "confidence",
                                "confLevel",
                                "deps"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "hasPayload": {
                          "type": "boolean"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "impacts": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "label": {
                                "maxLength": 160,
                                "minLength": 1,
                                "type": "string"
                              },
                              "level": {
                                "enum": [
                                  "low",
                                  "medium",
                                  "high"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "label"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "occurredAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "payload": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectName": {
                          "anyOf": [
                            {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "related": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "action": {
                                "maxLength": 160,
                                "minLength": 1,
                                "type": "string"
                              },
                              "actor": {
                                "maxLength": 160,
                                "minLength": 1,
                                "type": "string"
                              },
                              "actorApiKeyId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "actorKind": {
                                "enum": [
                                  "user",
                                  "connector",
                                  "engine",
                                  "scheduler"
                                ],
                                "type": "string"
                              },
                              "clientId": {
                                "anyOf": [
                                  {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clientName": {
                                "anyOf": [
                                  {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "connector": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "hasPayload": {
                                "type": "boolean"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "impacts": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "label": {
                                      "maxLength": 160,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "level": {
                                      "enum": [
                                        "low",
                                        "medium",
                                        "high"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "label"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "occurredAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "projectId": {
                                "anyOf": [
                                  {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "projectName": {
                                "anyOf": [
                                  {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "severity": {
                                "enum": [
                                  "info",
                                  "warn",
                                  "risk"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "success",
                                  "warning",
                                  "failed",
                                  "pending"
                                ],
                                "type": "string"
                              },
                              "target": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "occurredAt",
                              "actor",
                              "actorKind",
                              "action",
                              "target",
                              "connector",
                              "clientId",
                              "projectId",
                              "clientName",
                              "projectName",
                              "status",
                              "severity",
                              "impacts",
                              "hasPayload"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "severity": {
                          "enum": [
                            "info",
                            "warn",
                            "risk"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "success",
                            "warning",
                            "failed",
                            "pending"
                          ],
                          "type": "string"
                        },
                        "target": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "occurredAt",
                        "actor",
                        "actorKind",
                        "action",
                        "target",
                        "connector",
                        "clientId",
                        "projectId",
                        "clientName",
                        "projectName",
                        "status",
                        "severity",
                        "impacts",
                        "hasPayload",
                        "before",
                        "after",
                        "payload",
                        "related",
                        "explain",
                        "chain"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "event"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Inspect an accessible audit event",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "audit.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "audit-trail:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/billing": {
      "get": {
        "description": "Inspect current plan, entitlement caps, trial dates and billing ownership using the existing billing.read policy. Effective trial or downgrade state is resolved at request time. Checkout availability is informational and reflects current deployment and billing ownership; this GET does not contact Stripe or change a subscription. Amounts retain their currency and minor-unit conventions. The response is one billing summary without pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "billing.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "billing": {
                        "cancelAtPeriodEnd": false,
                        "catalogVersion": "v2",
                        "currentPeriodEnd": null,
                        "lastPaymentAt": null,
                        "lastPaymentStatus": null,
                        "managedPayments": false,
                        "plan": "free",
                        "status": "free",
                        "stripeCustomerId": null,
                        "stripePriceId": null,
                        "stripeProductId": null,
                        "stripeSubscriptionId": null,
                        "trialEndsAt": null,
                        "updatedAt": "1970-01-01T00:00:00.000Z",
                        "workspaceId": "22222222-2222-4222-8222-222222222222"
                      },
                      "canManageBilling": true,
                      "checkoutAvailable": false,
                      "checkoutCatalogVersion": "v2",
                      "checkoutPlans": [],
                      "entitlements": {
                        "cancelAtPeriodEnd": false,
                        "caps": {
                          "activeProjects": 10,
                          "clients": "unlimited",
                          "customRoles": false,
                          "dataWindowDays": 365,
                          "distributionRecipients": "unlimited",
                          "includedCreditsPerPeriod": 100,
                          "projects": "unlimited",
                          "qaAccess": true,
                          "reportsPerMonth": 100,
                          "scheduledBundles": "unlimited",
                          "syncFrequency": "daily"
                        },
                        "catalogVersion": "v2",
                        "currentPeriodEnd": null,
                        "effectiveCatalogVersion": "v2",
                        "effectivePlan": "growth",
                        "plan": "free",
                        "status": "free",
                        "trialEndsAt": "2026-10-15T06:54:37.897Z",
                        "trialOrigin": "workspace_signup"
                      },
                      "productTrial": {
                        "catalogVersion": "v2",
                        "endsAt": "2026-10-15T06:54:37.897Z",
                        "origin": "workspace_signup",
                        "plan": "growth",
                        "startsAt": "2026-10-01T06:54:37.897Z",
                        "workspaceId": "22222222-2222-4222-8222-222222222222"
                      },
                      "providerManagementUrl": null
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "billing": {
                      "additionalProperties": false,
                      "properties": {
                        "cancelAtPeriodEnd": {
                          "type": "boolean"
                        },
                        "catalogVersion": {
                          "enum": [
                            "v1",
                            "v2"
                          ],
                          "type": "string"
                        },
                        "currentPeriodEnd": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastPaymentAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastPaymentStatus": {
                          "anyOf": [
                            {
                              "enum": [
                                "paid",
                                "failed"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "managedPayments": {
                          "type": "boolean"
                        },
                        "plan": {
                          "enum": [
                            "free",
                            "entry",
                            "starter",
                            "growth",
                            "scale"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "free",
                            "incomplete",
                            "incomplete_expired",
                            "trialing",
                            "active",
                            "past_due",
                            "canceled",
                            "unpaid",
                            "paused"
                          ],
                          "type": "string"
                        },
                        "stripeCustomerId": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stripePriceId": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stripeProductId": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stripeSubscriptionId": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "trialEndsAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "workspaceId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "workspaceId",
                        "plan",
                        "status",
                        "stripeCustomerId",
                        "stripeSubscriptionId",
                        "stripeProductId",
                        "stripePriceId",
                        "managedPayments",
                        "trialEndsAt",
                        "currentPeriodEnd",
                        "cancelAtPeriodEnd",
                        "lastPaymentStatus",
                        "lastPaymentAt",
                        "updatedAt"
                      ],
                      "type": "object"
                    },
                    "billingWorkspaceId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "canManageBilling": {
                      "type": "boolean"
                    },
                    "checkoutAvailable": {
                      "type": "boolean"
                    },
                    "checkoutCatalogVersion": {
                      "enum": [
                        "v1",
                        "v2"
                      ],
                      "type": "string"
                    },
                    "checkoutPlans": {
                      "items": {
                        "enum": [
                          "entry",
                          "starter",
                          "growth",
                          "scale"
                        ],
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "entitlements": {
                      "additionalProperties": false,
                      "properties": {
                        "cancelAtPeriodEnd": {
                          "type": "boolean"
                        },
                        "caps": {
                          "additionalProperties": false,
                          "properties": {
                            "activeProjects": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "clients": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "customRoles": {
                              "type": "boolean"
                            },
                            "dataWindowDays": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "distributionRecipients": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "includedCreditsPerPeriod": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "projects": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "qaAccess": {
                              "type": "boolean"
                            },
                            "reportsPerMonth": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "scheduledBundles": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "const": "unlimited",
                                  "type": "string"
                                }
                              ]
                            },
                            "syncFrequency": {
                              "enum": [
                                "weekly",
                                "daily",
                                "hourly"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "clients",
                            "projects",
                            "dataWindowDays",
                            "reportsPerMonth",
                            "syncFrequency",
                            "qaAccess",
                            "distributionRecipients",
                            "scheduledBundles",
                            "customRoles"
                          ],
                          "type": "object"
                        },
                        "catalogVersion": {
                          "enum": [
                            "v1",
                            "v2"
                          ],
                          "type": "string"
                        },
                        "currentPeriodEnd": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "effectiveCatalogVersion": {
                          "enum": [
                            "v1",
                            "v2"
                          ],
                          "type": "string"
                        },
                        "effectivePlan": {
                          "enum": [
                            "free",
                            "entry",
                            "starter",
                            "growth",
                            "scale"
                          ],
                          "type": "string"
                        },
                        "plan": {
                          "enum": [
                            "free",
                            "entry",
                            "starter",
                            "growth",
                            "scale"
                          ],
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "free",
                            "incomplete",
                            "incomplete_expired",
                            "trialing",
                            "active",
                            "past_due",
                            "canceled",
                            "unpaid",
                            "paused"
                          ],
                          "type": "string"
                        },
                        "trialEndsAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "trialOrigin": {
                          "anyOf": [
                            {
                              "enum": [
                                "workspace_signup"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "plan",
                        "effectivePlan",
                        "status",
                        "caps",
                        "trialEndsAt",
                        "trialOrigin",
                        "currentPeriodEnd",
                        "cancelAtPeriodEnd"
                      ],
                      "type": "object"
                    },
                    "productTrial": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "catalogVersion": {
                              "enum": [
                                "v1",
                                "v2"
                              ],
                              "type": "string"
                            },
                            "endsAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "origin": {
                              "enum": [
                                "workspace_signup"
                              ],
                              "type": "string"
                            },
                            "plan": {
                              "enum": [
                                "entry",
                                "starter",
                                "growth",
                                "scale"
                              ],
                              "type": "string"
                            },
                            "startsAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "workspaceId": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "workspaceId",
                            "origin",
                            "plan",
                            "startsAt",
                            "endsAt"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerManagementUrl": {
                      "anyOf": [
                        {
                          "format": "uri",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "billing",
                    "productTrial",
                    "entitlements",
                    "canManageBilling",
                    "checkoutAvailable",
                    "checkoutPlans",
                    "providerManagementUrl"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read current workspace usage and billing",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "billing.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "usage-billing:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/client-register": {
      "get": {
        "description": "Use the existing register aggregate with nested projects, commercial engagement terms, role rates and source attribution mappings. A client is your customer, separate from your ScopeWorth organization and workspace. GET /directory discovers project and client IDs. Listing returns all aggregates ordered by customer name without pagination; onboarding clients may have zero projects. Detail omits browser drafts. POST accepts a complete form without an autosave; PATCH requires the latest version from GET and stale writes return 409. Existing projects belong to that client, initiatives belong to that project, connections belong to that workspace, and current creator scope still applies. Amounts are integer minor currency units and rate units remain explicit. Organization-pooled limits are atomic and retries consume capacity once. Quota/conflict returns 409, invalid values 400, foreign resources 404. Writes require Idempotency-Key; reuse it only with the same normalized request, use a new key for each intentional edit. No invitation, email, provider request, logo, draft, deletion or archive endpoint is exposed. Mappings can attribute existing local evidence through the existing service.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nPATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.\n\nWrites require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.\n\nCommercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.\n\nPublic writes preserve browser drafts; their normal version checks reject stale edits.",
        "operationId": "clients.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic create-read-update",
                    "value": {
                      "clients": [
                        {
                          "clientId": "11111111-1111-4111-8111-111111111111",
                          "connections": [],
                          "connectorWarning": true,
                          "form": {
                            "commercial": {
                              "billingFrequency": null,
                              "billingModel": "time_and_materials",
                              "blendedCostPerHourCents": null,
                              "contractedAmountCents": null,
                              "contractedHours": null,
                              "contractEnd": null,
                              "contractStart": "2026-10-01",
                              "currency": "USD",
                              "defaultBillingRatePerHourCents": null,
                              "hourlyBillingRateCents": null,
                              "includeAiToolingCosts": false,
                              "includeCloudCosts": false,
                              "includeContractorCosts": false,
                              "includeMeetingCosts": false,
                              "monthlyFeeCents": null,
                              "revenueSource": null,
                              "targetMarginPct": null
                            },
                            "profile": {
                              "accountManager": null,
                              "companyName": "Example customer",
                              "contactEmail": null,
                              "contactName": null,
                              "country": null,
                              "deliveryLead": null,
                              "industry": null,
                              "internalOwner": null,
                              "logoUrl": null,
                              "region": null,
                              "status": "active",
                              "timeZone": null,
                              "website": null
                            },
                            "projects": [
                              {
                                "budgetCents": null,
                                "description": null,
                                "endsOn": null,
                                "id": "22222222-2222-4222-8222-222222222222",
                                "initiatives": [],
                                "mappings": [],
                                "name": "Example delivery",
                                "objective": null,
                                "outcomeMetric": null,
                                "projectType": "Software delivery",
                                "rates": [],
                                "risk": "unknown",
                                "scopeLockDate": "2026-10-01",
                                "startsOn": "2026-10-01",
                                "status": "active",
                                "team": []
                              }
                            ]
                          },
                          "version": 1
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clients": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "connections": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "label": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "provider": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "status": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "provider",
                                "label",
                                "status"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "connectorWarning": {
                            "type": "boolean"
                          },
                          "form": {
                            "additionalProperties": false,
                            "properties": {
                              "commercial": {
                                "additionalProperties": false,
                                "properties": {
                                  "billingFrequency": {
                                    "anyOf": [
                                      {
                                        "maxLength": 80,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "billingModel": {
                                    "enum": [
                                      "time_and_materials",
                                      "fixed_price",
                                      "retainer"
                                    ],
                                    "type": "string"
                                  },
                                  "blendedCostPerHourCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "contractedAmountCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "contractedHours": {
                                    "anyOf": [
                                      {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "contractEnd": {
                                    "anyOf": [
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "contractStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "currency": {
                                    "pattern": "^[A-Z]{3}$",
                                    "type": "string"
                                  },
                                  "defaultBillingRatePerHourCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "hourlyBillingRateCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "includeAiToolingCosts": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "includeCloudCosts": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "includeContractorCosts": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "includeMeetingCosts": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "monthlyFeeCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "revenueSource": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "targetMarginPct": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  }
                                },
                                "required": [
                                  "billingModel",
                                  "currency",
                                  "contractStart",
                                  "contractEnd",
                                  "contractedAmountCents",
                                  "contractedHours",
                                  "targetMarginPct",
                                  "billingFrequency",
                                  "revenueSource",
                                  "hourlyBillingRateCents",
                                  "monthlyFeeCents",
                                  "blendedCostPerHourCents",
                                  "defaultBillingRatePerHourCents",
                                  "includeCloudCosts",
                                  "includeMeetingCosts",
                                  "includeAiToolingCosts",
                                  "includeContractorCosts"
                                ],
                                "type": "object"
                              },
                              "profile": {
                                "additionalProperties": false,
                                "properties": {
                                  "accountManager": {
                                    "anyOf": [
                                      {
                                        "maxLength": 160,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "companyName": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "contactEmail": {
                                    "anyOf": [
                                      {
                                        "format": "email",
                                        "maxLength": 320,
                                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "contactName": {
                                    "anyOf": [
                                      {
                                        "maxLength": 160,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "country": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "deliveryLead": {
                                    "anyOf": [
                                      {
                                        "maxLength": 160,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "displayName": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "industry": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "internalOwner": {
                                    "anyOf": [
                                      {
                                        "maxLength": 160,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "logoUrl": {
                                    "anyOf": [
                                      {
                                        "maxLength": 2048,
                                        "pattern": "^\\/workspaces\\/.*",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "region": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "status": {
                                    "default": "active",
                                    "enum": [
                                      "active",
                                      "archived"
                                    ],
                                    "type": "string"
                                  },
                                  "timeZone": {
                                    "anyOf": [
                                      {
                                        "maxLength": 80,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "website": {
                                    "anyOf": [
                                      {
                                        "format": "uri",
                                        "maxLength": 2048,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  }
                                },
                                "required": [
                                  "companyName",
                                  "industry",
                                  "region",
                                  "country",
                                  "timeZone",
                                  "contactName",
                                  "contactEmail",
                                  "website",
                                  "logoUrl",
                                  "internalOwner",
                                  "accountManager",
                                  "deliveryLead",
                                  "status"
                                ],
                                "type": "object"
                              },
                              "projects": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "budgetCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "maxLength": 4000,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "endsOn": {
                                      "anyOf": [
                                        {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "initiatives": {
                                      "default": [],
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "budgetCents": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "description": {
                                            "anyOf": [
                                              {
                                                "maxLength": 2000,
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "name": {
                                            "maxLength": 200,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "priority": {
                                            "default": "none",
                                            "enum": [
                                              "high",
                                              "medium",
                                              "low",
                                              "none"
                                            ],
                                            "type": "string"
                                          },
                                          "source": {
                                            "const": "manual",
                                            "default": "manual",
                                            "type": "string"
                                          },
                                          "status": {
                                            "default": "planned",
                                            "enum": [
                                              "planned",
                                              "active",
                                              "completed",
                                              "cancelled"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "description",
                                          "budgetCents",
                                          "priority",
                                          "status",
                                          "source"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 100,
                                      "type": "array"
                                    },
                                    "mappings": {
                                      "default": [],
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "connectionId": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "externalProjectKey": {
                                            "maxLength": 120,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "connectionId",
                                          "externalProjectKey"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 100,
                                      "type": "array"
                                    },
                                    "name": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "objective": {
                                      "anyOf": [
                                        {
                                          "maxLength": 2000,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "outcomeMetric": {
                                      "anyOf": [
                                        {
                                          "maxLength": 500,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "projectType": {
                                      "anyOf": [
                                        {
                                          "maxLength": 120,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "rates": {
                                      "default": [],
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "amountCents": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "currency": {
                                            "pattern": "^[A-Z]{3}$",
                                            "type": "string"
                                          },
                                          "role": {
                                            "maxLength": 120,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "unit": {
                                            "default": "hour",
                                            "enum": [
                                              "hour",
                                              "day"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "amountCents",
                                          "currency",
                                          "unit"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 100,
                                      "type": "array"
                                    },
                                    "risk": {
                                      "default": "unknown",
                                      "enum": [
                                        "low",
                                        "medium",
                                        "high",
                                        "unknown"
                                      ],
                                      "type": "string"
                                    },
                                    "scopeLockDate": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "startsOn": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "status": {
                                      "default": "active",
                                      "enum": [
                                        "active",
                                        "paused",
                                        "completed",
                                        "archived"
                                      ],
                                      "type": "string"
                                    },
                                    "team": {
                                      "default": [],
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "alias": {
                                            "maxLength": 120,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "allocationPct": {
                                            "anyOf": [
                                              {
                                                "maximum": 100,
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "role": {
                                            "maxLength": 120,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "alias",
                                          "role",
                                          "allocationPct"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 100,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "projectType",
                                    "status",
                                    "startsOn",
                                    "endsOn",
                                    "scopeLockDate",
                                    "budgetCents",
                                    "objective",
                                    "outcomeMetric",
                                    "risk",
                                    "description",
                                    "team",
                                    "rates",
                                    "mappings",
                                    "initiatives"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              }
                            },
                            "required": [
                              "profile",
                              "commercial",
                              "projects"
                            ],
                            "type": "object"
                          },
                          "rowsAttributed": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "version": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "clientId",
                          "form",
                          "version",
                          "connections",
                          "connectorWarning"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "clients"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List customer engagements",
        "tags": [
          "clients"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "clients.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "PATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.",
            "Writes require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.",
            "Commercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.",
            "Public writes preserve browser drafts; their normal version checks reject stale edits."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "clients:read",
          "stability": "stable"
        }
      },
      "post": {
        "description": "Use the existing register aggregate with nested projects, commercial engagement terms, role rates and source attribution mappings. A client is your customer, separate from your ScopeWorth organization and workspace. GET /directory discovers project and client IDs. Listing returns all aggregates ordered by customer name without pagination; onboarding clients may have zero projects. Detail omits browser drafts. POST accepts a complete form without an autosave; PATCH requires the latest version from GET and stale writes return 409. Existing projects belong to that client, initiatives belong to that project, connections belong to that workspace, and current creator scope still applies. Amounts are integer minor currency units and rate units remain explicit. Organization-pooled limits are atomic and retries consume capacity once. Quota/conflict returns 409, invalid values 400, foreign resources 404. Writes require Idempotency-Key; reuse it only with the same normalized request, use a new key for each intentional edit. No invitation, email, provider request, logo, draft, deletion or archive endpoint is exposed. Mappings can attribute existing local evidence through the existing service.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nPATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.\n\nWrites require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.\n\nCommercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.\n\nPublic writes preserve browser drafts; their normal version checks reject stale edits.",
        "operationId": "clients.create",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-create-1",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "form": {
                      "commercial": {
                        "billingFrequency": null,
                        "billingModel": "time_and_materials",
                        "blendedCostPerHourCents": null,
                        "contractedAmountCents": null,
                        "contractedHours": null,
                        "contractEnd": null,
                        "contractStart": "2026-10-01",
                        "currency": "USD",
                        "defaultBillingRatePerHourCents": null,
                        "hourlyBillingRateCents": null,
                        "includeAiToolingCosts": false,
                        "includeCloudCosts": false,
                        "includeContractorCosts": false,
                        "includeMeetingCosts": false,
                        "monthlyFeeCents": null,
                        "revenueSource": null,
                        "targetMarginPct": null
                      },
                      "profile": {
                        "accountManager": null,
                        "companyName": "Example customer",
                        "contactEmail": null,
                        "contactName": null,
                        "country": null,
                        "deliveryLead": null,
                        "industry": null,
                        "internalOwner": null,
                        "logoUrl": null,
                        "region": null,
                        "status": "active",
                        "timeZone": null,
                        "website": null
                      },
                      "projects": [
                        {
                          "budgetCents": null,
                          "description": null,
                          "endsOn": null,
                          "initiatives": [],
                          "mappings": [],
                          "name": "Example delivery",
                          "objective": null,
                          "outcomeMetric": null,
                          "projectType": "Software delivery",
                          "rates": [],
                          "risk": "unknown",
                          "scopeLockDate": "2026-10-01",
                          "startsOn": "2026-10-01",
                          "status": "active",
                          "team": []
                        }
                      ]
                    }
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "form": {
                    "properties": {
                      "commercial": {
                        "properties": {
                          "billingFrequency": {
                            "anyOf": [
                              {
                                "maxLength": 80,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "billingModel": {
                            "enum": [
                              "time_and_materials",
                              "fixed_price",
                              "retainer"
                            ],
                            "type": "string"
                          },
                          "blendedCostPerHourCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractedAmountCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractedHours": {
                            "anyOf": [
                              {
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractEnd": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractStart": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "currency": {
                            "pattern": "^[A-Z]{3}$",
                            "type": "string"
                          },
                          "defaultBillingRatePerHourCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "hourlyBillingRateCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "includeAiToolingCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeCloudCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeContractorCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeMeetingCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "monthlyFeeCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "revenueSource": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "targetMarginPct": {
                            "anyOf": [
                              {
                                "maximum": 100,
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "billingModel",
                          "currency",
                          "contractStart"
                        ],
                        "type": "object"
                      },
                      "profile": {
                        "properties": {
                          "accountManager": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "companyName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "contactEmail": {
                            "anyOf": [
                              {
                                "format": "email",
                                "maxLength": 320,
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contactName": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "country": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "deliveryLead": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "displayName": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "industry": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "internalOwner": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "logoUrl": {
                            "anyOf": [
                              {
                                "maxLength": 2048,
                                "pattern": "^\\/workspaces\\/.*",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "region": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "status": {
                            "default": "active",
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          },
                          "timeZone": {
                            "anyOf": [
                              {
                                "maxLength": 80,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "website": {
                            "anyOf": [
                              {
                                "format": "uri",
                                "maxLength": 2048,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "companyName"
                        ],
                        "type": "object"
                      },
                      "projects": {
                        "items": {
                          "properties": {
                            "budgetCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "description": {
                              "anyOf": [
                                {
                                  "maxLength": 4000,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "endsOn": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "id": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "initiatives": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "budgetCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "description": {
                                    "anyOf": [
                                      {
                                        "maxLength": 2000,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "priority": {
                                    "default": "none",
                                    "enum": [
                                      "high",
                                      "medium",
                                      "low",
                                      "none"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "const": "manual",
                                    "default": "manual",
                                    "type": "string"
                                  },
                                  "status": {
                                    "default": "planned",
                                    "enum": [
                                      "planned",
                                      "active",
                                      "completed",
                                      "cancelled"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "mappings": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "connectionId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "externalProjectKey": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "connectionId",
                                  "externalProjectKey"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "objective": {
                              "anyOf": [
                                {
                                  "maxLength": 2000,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "outcomeMetric": {
                              "anyOf": [
                                {
                                  "maxLength": 500,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "projectType": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "rates": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "amountCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "pattern": "^[A-Z]{3}$",
                                    "type": "string"
                                  },
                                  "role": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "default": "hour",
                                    "enum": [
                                      "hour",
                                      "day"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "role",
                                  "amountCents",
                                  "currency"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "risk": {
                              "default": "unknown",
                              "enum": [
                                "low",
                                "medium",
                                "high",
                                "unknown"
                              ],
                              "type": "string"
                            },
                            "scopeLockDate": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "startsOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "status": {
                              "default": "active",
                              "enum": [
                                "active",
                                "paused",
                                "completed",
                                "archived"
                              ],
                              "type": "string"
                            },
                            "team": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "alias": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "allocationPct": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "role": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "role"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            }
                          },
                          "required": [
                            "name",
                            "startsOn",
                            "scopeLockDate"
                          ],
                          "type": "object"
                        },
                        "maxItems": 100,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "profile",
                      "commercial",
                      "projects"
                    ],
                    "type": "object"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "form"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic create-read-update",
                    "value": {
                      "clientId": "11111111-1111-4111-8111-111111111111",
                      "connections": [],
                      "connectorWarning": true,
                      "form": {
                        "commercial": {
                          "billingFrequency": null,
                          "billingModel": "time_and_materials",
                          "blendedCostPerHourCents": null,
                          "contractedAmountCents": null,
                          "contractedHours": null,
                          "contractEnd": null,
                          "contractStart": "2026-10-01",
                          "currency": "USD",
                          "defaultBillingRatePerHourCents": null,
                          "hourlyBillingRateCents": null,
                          "includeAiToolingCosts": false,
                          "includeCloudCosts": false,
                          "includeContractorCosts": false,
                          "includeMeetingCosts": false,
                          "monthlyFeeCents": null,
                          "revenueSource": null,
                          "targetMarginPct": null
                        },
                        "profile": {
                          "accountManager": null,
                          "companyName": "Example customer",
                          "contactEmail": null,
                          "contactName": null,
                          "country": null,
                          "deliveryLead": null,
                          "industry": null,
                          "internalOwner": null,
                          "logoUrl": null,
                          "region": null,
                          "status": "active",
                          "timeZone": null,
                          "website": null
                        },
                        "projects": [
                          {
                            "budgetCents": null,
                            "description": null,
                            "endsOn": null,
                            "id": "22222222-2222-4222-8222-222222222222",
                            "initiatives": [],
                            "mappings": [],
                            "name": "Example delivery",
                            "objective": null,
                            "outcomeMetric": null,
                            "projectType": "Software delivery",
                            "rates": [],
                            "risk": "unknown",
                            "scopeLockDate": "2026-10-01",
                            "startsOn": "2026-10-01",
                            "status": "active",
                            "team": []
                          }
                        ]
                      },
                      "rowsAttributed": 0,
                      "version": 1
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clientId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "provider": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "provider",
                          "label",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "connectorWarning": {
                      "type": "boolean"
                    },
                    "form": {
                      "additionalProperties": false,
                      "properties": {
                        "commercial": {
                          "additionalProperties": false,
                          "properties": {
                            "billingFrequency": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "billingModel": {
                              "enum": [
                                "time_and_materials",
                                "fixed_price",
                                "retainer"
                              ],
                              "type": "string"
                            },
                            "blendedCostPerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedAmountCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractEnd": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "defaultBillingRatePerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "hourlyBillingRateCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "includeAiToolingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeCloudCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeContractorCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeMeetingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "monthlyFeeCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "revenueSource": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "targetMarginPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "billingModel",
                            "currency",
                            "contractStart",
                            "contractEnd",
                            "contractedAmountCents",
                            "contractedHours",
                            "targetMarginPct",
                            "billingFrequency",
                            "revenueSource",
                            "hourlyBillingRateCents",
                            "monthlyFeeCents",
                            "blendedCostPerHourCents",
                            "defaultBillingRatePerHourCents",
                            "includeCloudCosts",
                            "includeMeetingCosts",
                            "includeAiToolingCosts",
                            "includeContractorCosts"
                          ],
                          "type": "object"
                        },
                        "profile": {
                          "additionalProperties": false,
                          "properties": {
                            "accountManager": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "companyName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "contactEmail": {
                              "anyOf": [
                                {
                                  "format": "email",
                                  "maxLength": 320,
                                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contactName": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "country": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "deliveryLead": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "industry": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "internalOwner": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "logoUrl": {
                              "anyOf": [
                                {
                                  "maxLength": 2048,
                                  "pattern": "^\\/workspaces\\/.*",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "region": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "status": {
                              "default": "active",
                              "enum": [
                                "active",
                                "archived"
                              ],
                              "type": "string"
                            },
                            "timeZone": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "website": {
                              "anyOf": [
                                {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "companyName",
                            "industry",
                            "region",
                            "country",
                            "timeZone",
                            "contactName",
                            "contactEmail",
                            "website",
                            "logoUrl",
                            "internalOwner",
                            "accountManager",
                            "deliveryLead",
                            "status"
                          ],
                          "type": "object"
                        },
                        "projects": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "budgetCents": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "maxLength": 4000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "endsOn": {
                                "anyOf": [
                                  {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "initiatives": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "budgetCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "maxLength": 2000,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "name": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "priority": {
                                      "default": "none",
                                      "enum": [
                                        "high",
                                        "medium",
                                        "low",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "source": {
                                      "const": "manual",
                                      "default": "manual",
                                      "type": "string"
                                    },
                                    "status": {
                                      "default": "planned",
                                      "enum": [
                                        "planned",
                                        "active",
                                        "completed",
                                        "cancelled"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "description",
                                    "budgetCents",
                                    "priority",
                                    "status",
                                    "source"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "mappings": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "connectionId": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "externalProjectKey": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "connectionId",
                                    "externalProjectKey"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "objective": {
                                "anyOf": [
                                  {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "outcomeMetric": {
                                "anyOf": [
                                  {
                                    "maxLength": 500,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "projectType": {
                                "anyOf": [
                                  {
                                    "maxLength": 120,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "rates": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amountCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "currency": {
                                      "pattern": "^[A-Z]{3}$",
                                      "type": "string"
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "default": "hour",
                                      "enum": [
                                        "hour",
                                        "day"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "amountCents",
                                    "currency",
                                    "unit"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "risk": {
                                "default": "unknown",
                                "enum": [
                                  "low",
                                  "medium",
                                  "high",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "scopeLockDate": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "startsOn": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "status": {
                                "default": "active",
                                "enum": [
                                  "active",
                                  "paused",
                                  "completed",
                                  "archived"
                                ],
                                "type": "string"
                              },
                              "team": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "alias": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "allocationPct": {
                                      "anyOf": [
                                        {
                                          "maximum": 100,
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "alias",
                                    "role",
                                    "allocationPct"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "projectType",
                              "status",
                              "startsOn",
                              "endsOn",
                              "scopeLockDate",
                              "budgetCents",
                              "objective",
                              "outcomeMetric",
                              "risk",
                              "description",
                              "team",
                              "rates",
                              "mappings",
                              "initiatives"
                            ],
                            "type": "object"
                          },
                          "maxItems": 100,
                          "type": "array"
                        }
                      },
                      "required": [
                        "profile",
                        "commercial",
                        "projects"
                      ],
                      "type": "object"
                    },
                    "rowsAttributed": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "version": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "clientId",
                    "form",
                    "version",
                    "connections",
                    "connectorWarning"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create a customer and its projects",
        "tags": [
          "clients"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "clients.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "PATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.",
            "Writes require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.",
            "Commercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.",
            "Public writes preserve browser drafts; their normal version checks reject stale edits."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "clients:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/client-register/{clientId}": {
      "get": {
        "description": "Use the existing register aggregate with nested projects, commercial engagement terms, role rates and source attribution mappings. A client is your customer, separate from your ScopeWorth organization and workspace. GET /directory discovers project and client IDs. Listing returns all aggregates ordered by customer name without pagination; onboarding clients may have zero projects. Detail omits browser drafts. POST accepts a complete form without an autosave; PATCH requires the latest version from GET and stale writes return 409. Existing projects belong to that client, initiatives belong to that project, connections belong to that workspace, and current creator scope still applies. Amounts are integer minor currency units and rate units remain explicit. Organization-pooled limits are atomic and retries consume capacity once. Quota/conflict returns 409, invalid values 400, foreign resources 404. Writes require Idempotency-Key; reuse it only with the same normalized request, use a new key for each intentional edit. No invitation, email, provider request, logo, draft, deletion or archive endpoint is exposed. Mappings can attribute existing local evidence through the existing service.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nPATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.\n\nWrites require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.\n\nCommercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.\n\nPublic writes preserve browser drafts; their normal version checks reject stale edits.",
        "operationId": "clients.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic create-read-update",
                    "value": {
                      "clientId": "11111111-1111-4111-8111-111111111111",
                      "connections": [],
                      "connectorWarning": true,
                      "form": {
                        "commercial": {
                          "billingFrequency": null,
                          "billingModel": "time_and_materials",
                          "blendedCostPerHourCents": null,
                          "contractedAmountCents": null,
                          "contractedHours": null,
                          "contractEnd": null,
                          "contractStart": "2026-10-01",
                          "currency": "USD",
                          "defaultBillingRatePerHourCents": null,
                          "hourlyBillingRateCents": null,
                          "includeAiToolingCosts": false,
                          "includeCloudCosts": false,
                          "includeContractorCosts": false,
                          "includeMeetingCosts": false,
                          "monthlyFeeCents": null,
                          "revenueSource": null,
                          "targetMarginPct": null
                        },
                        "profile": {
                          "accountManager": null,
                          "companyName": "Example customer",
                          "contactEmail": null,
                          "contactName": null,
                          "country": null,
                          "deliveryLead": null,
                          "industry": null,
                          "internalOwner": null,
                          "logoUrl": null,
                          "region": null,
                          "status": "active",
                          "timeZone": null,
                          "website": null
                        },
                        "projects": [
                          {
                            "budgetCents": null,
                            "description": null,
                            "endsOn": null,
                            "id": "22222222-2222-4222-8222-222222222222",
                            "initiatives": [],
                            "mappings": [],
                            "name": "Example delivery",
                            "objective": null,
                            "outcomeMetric": null,
                            "projectType": "Software delivery",
                            "rates": [],
                            "risk": "unknown",
                            "scopeLockDate": "2026-10-01",
                            "startsOn": "2026-10-01",
                            "status": "active",
                            "team": []
                          }
                        ]
                      },
                      "version": 1
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clientId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "provider": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "provider",
                          "label",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "connectorWarning": {
                      "type": "boolean"
                    },
                    "form": {
                      "additionalProperties": false,
                      "properties": {
                        "commercial": {
                          "additionalProperties": false,
                          "properties": {
                            "billingFrequency": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "billingModel": {
                              "enum": [
                                "time_and_materials",
                                "fixed_price",
                                "retainer"
                              ],
                              "type": "string"
                            },
                            "blendedCostPerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedAmountCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractEnd": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "defaultBillingRatePerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "hourlyBillingRateCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "includeAiToolingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeCloudCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeContractorCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeMeetingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "monthlyFeeCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "revenueSource": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "targetMarginPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "billingModel",
                            "currency",
                            "contractStart",
                            "contractEnd",
                            "contractedAmountCents",
                            "contractedHours",
                            "targetMarginPct",
                            "billingFrequency",
                            "revenueSource",
                            "hourlyBillingRateCents",
                            "monthlyFeeCents",
                            "blendedCostPerHourCents",
                            "defaultBillingRatePerHourCents",
                            "includeCloudCosts",
                            "includeMeetingCosts",
                            "includeAiToolingCosts",
                            "includeContractorCosts"
                          ],
                          "type": "object"
                        },
                        "profile": {
                          "additionalProperties": false,
                          "properties": {
                            "accountManager": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "companyName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "contactEmail": {
                              "anyOf": [
                                {
                                  "format": "email",
                                  "maxLength": 320,
                                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contactName": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "country": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "deliveryLead": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "industry": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "internalOwner": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "logoUrl": {
                              "anyOf": [
                                {
                                  "maxLength": 2048,
                                  "pattern": "^\\/workspaces\\/.*",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "region": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "status": {
                              "default": "active",
                              "enum": [
                                "active",
                                "archived"
                              ],
                              "type": "string"
                            },
                            "timeZone": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "website": {
                              "anyOf": [
                                {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "companyName",
                            "industry",
                            "region",
                            "country",
                            "timeZone",
                            "contactName",
                            "contactEmail",
                            "website",
                            "logoUrl",
                            "internalOwner",
                            "accountManager",
                            "deliveryLead",
                            "status"
                          ],
                          "type": "object"
                        },
                        "projects": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "budgetCents": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "maxLength": 4000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "endsOn": {
                                "anyOf": [
                                  {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "initiatives": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "budgetCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "maxLength": 2000,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "name": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "priority": {
                                      "default": "none",
                                      "enum": [
                                        "high",
                                        "medium",
                                        "low",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "source": {
                                      "const": "manual",
                                      "default": "manual",
                                      "type": "string"
                                    },
                                    "status": {
                                      "default": "planned",
                                      "enum": [
                                        "planned",
                                        "active",
                                        "completed",
                                        "cancelled"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "description",
                                    "budgetCents",
                                    "priority",
                                    "status",
                                    "source"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "mappings": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "connectionId": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "externalProjectKey": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "connectionId",
                                    "externalProjectKey"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "objective": {
                                "anyOf": [
                                  {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "outcomeMetric": {
                                "anyOf": [
                                  {
                                    "maxLength": 500,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "projectType": {
                                "anyOf": [
                                  {
                                    "maxLength": 120,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "rates": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amountCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "currency": {
                                      "pattern": "^[A-Z]{3}$",
                                      "type": "string"
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "default": "hour",
                                      "enum": [
                                        "hour",
                                        "day"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "amountCents",
                                    "currency",
                                    "unit"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "risk": {
                                "default": "unknown",
                                "enum": [
                                  "low",
                                  "medium",
                                  "high",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "scopeLockDate": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "startsOn": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "status": {
                                "default": "active",
                                "enum": [
                                  "active",
                                  "paused",
                                  "completed",
                                  "archived"
                                ],
                                "type": "string"
                              },
                              "team": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "alias": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "allocationPct": {
                                      "anyOf": [
                                        {
                                          "maximum": 100,
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "alias",
                                    "role",
                                    "allocationPct"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "projectType",
                              "status",
                              "startsOn",
                              "endsOn",
                              "scopeLockDate",
                              "budgetCents",
                              "objective",
                              "outcomeMetric",
                              "risk",
                              "description",
                              "team",
                              "rates",
                              "mappings",
                              "initiatives"
                            ],
                            "type": "object"
                          },
                          "maxItems": 100,
                          "type": "array"
                        }
                      },
                      "required": [
                        "profile",
                        "commercial",
                        "projects"
                      ],
                      "type": "object"
                    },
                    "rowsAttributed": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "version": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "clientId",
                    "form",
                    "version",
                    "connections",
                    "connectorWarning"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read a customer engagement",
        "tags": [
          "clients"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "clients.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "PATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.",
            "Writes require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.",
            "Commercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.",
            "Public writes preserve browser drafts; their normal version checks reject stale edits."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "clients:read",
          "stability": "stable"
        }
      },
      "patch": {
        "description": "Use the existing register aggregate with nested projects, commercial engagement terms, role rates and source attribution mappings. A client is your customer, separate from your ScopeWorth organization and workspace. GET /directory discovers project and client IDs. Listing returns all aggregates ordered by customer name without pagination; onboarding clients may have zero projects. Detail omits browser drafts. POST accepts a complete form without an autosave; PATCH requires the latest version from GET and stale writes return 409. Existing projects belong to that client, initiatives belong to that project, connections belong to that workspace, and current creator scope still applies. Amounts are integer minor currency units and rate units remain explicit. Organization-pooled limits are atomic and retries consume capacity once. Quota/conflict returns 409, invalid values 400, foreign resources 404. Writes require Idempotency-Key; reuse it only with the same normalized request, use a new key for each intentional edit. No invitation, email, provider request, logo, draft, deletion or archive endpoint is exposed. Mappings can attribute existing local evidence through the existing service.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nPATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.\n\nWrites require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.\n\nCommercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.\n\nPublic writes preserve browser drafts; their normal version checks reject stale edits.",
        "operationId": "clients.update",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "clientId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-update-1",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "form": {
                      "commercial": {
                        "billingFrequency": null,
                        "billingModel": "time_and_materials",
                        "blendedCostPerHourCents": null,
                        "contractedAmountCents": null,
                        "contractedHours": null,
                        "contractEnd": null,
                        "contractStart": "2026-10-01",
                        "currency": "USD",
                        "defaultBillingRatePerHourCents": null,
                        "hourlyBillingRateCents": null,
                        "includeAiToolingCosts": false,
                        "includeCloudCosts": false,
                        "includeContractorCosts": false,
                        "includeMeetingCosts": false,
                        "monthlyFeeCents": null,
                        "revenueSource": null,
                        "targetMarginPct": null
                      },
                      "profile": {
                        "accountManager": null,
                        "companyName": "Example customer",
                        "contactEmail": null,
                        "contactName": null,
                        "country": null,
                        "deliveryLead": null,
                        "industry": null,
                        "internalOwner": null,
                        "logoUrl": null,
                        "region": null,
                        "status": "active",
                        "timeZone": null,
                        "website": null
                      },
                      "projects": [
                        {
                          "budgetCents": null,
                          "description": null,
                          "endsOn": null,
                          "id": "22222222-2222-4222-8222-222222222222",
                          "initiatives": [],
                          "mappings": [],
                          "name": "Example delivery",
                          "objective": null,
                          "outcomeMetric": null,
                          "projectType": "Software delivery",
                          "rates": [],
                          "risk": "unknown",
                          "scopeLockDate": "2026-10-01",
                          "startsOn": "2026-10-01",
                          "status": "active",
                          "team": []
                        }
                      ]
                    },
                    "version": 1
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "form": {
                    "properties": {
                      "commercial": {
                        "properties": {
                          "billingFrequency": {
                            "anyOf": [
                              {
                                "maxLength": 80,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "billingModel": {
                            "enum": [
                              "time_and_materials",
                              "fixed_price",
                              "retainer"
                            ],
                            "type": "string"
                          },
                          "blendedCostPerHourCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractedAmountCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractedHours": {
                            "anyOf": [
                              {
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractEnd": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contractStart": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "currency": {
                            "pattern": "^[A-Z]{3}$",
                            "type": "string"
                          },
                          "defaultBillingRatePerHourCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "hourlyBillingRateCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "includeAiToolingCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeCloudCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeContractorCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "includeMeetingCosts": {
                            "default": false,
                            "type": "boolean"
                          },
                          "monthlyFeeCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "revenueSource": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "targetMarginPct": {
                            "anyOf": [
                              {
                                "maximum": 100,
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "billingModel",
                          "currency",
                          "contractStart"
                        ],
                        "type": "object"
                      },
                      "profile": {
                        "properties": {
                          "accountManager": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "companyName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "contactEmail": {
                            "anyOf": [
                              {
                                "format": "email",
                                "maxLength": 320,
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "contactName": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "country": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "deliveryLead": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "displayName": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "industry": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "internalOwner": {
                            "anyOf": [
                              {
                                "maxLength": 160,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "logoUrl": {
                            "anyOf": [
                              {
                                "maxLength": 2048,
                                "pattern": "^\\/workspaces\\/.*",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "region": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "status": {
                            "default": "active",
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          },
                          "timeZone": {
                            "anyOf": [
                              {
                                "maxLength": 80,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "website": {
                            "anyOf": [
                              {
                                "format": "uri",
                                "maxLength": 2048,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "companyName"
                        ],
                        "type": "object"
                      },
                      "projects": {
                        "items": {
                          "properties": {
                            "budgetCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "description": {
                              "anyOf": [
                                {
                                  "maxLength": 4000,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "endsOn": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "id": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "initiatives": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "budgetCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "description": {
                                    "anyOf": [
                                      {
                                        "maxLength": 2000,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "name": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "priority": {
                                    "default": "none",
                                    "enum": [
                                      "high",
                                      "medium",
                                      "low",
                                      "none"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "const": "manual",
                                    "default": "manual",
                                    "type": "string"
                                  },
                                  "status": {
                                    "default": "planned",
                                    "enum": [
                                      "planned",
                                      "active",
                                      "completed",
                                      "cancelled"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "mappings": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "connectionId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "externalProjectKey": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "connectionId",
                                  "externalProjectKey"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "objective": {
                              "anyOf": [
                                {
                                  "maxLength": 2000,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "outcomeMetric": {
                              "anyOf": [
                                {
                                  "maxLength": 500,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "projectType": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "rates": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "amountCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "pattern": "^[A-Z]{3}$",
                                    "type": "string"
                                  },
                                  "role": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "default": "hour",
                                    "enum": [
                                      "hour",
                                      "day"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "role",
                                  "amountCents",
                                  "currency"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "risk": {
                              "default": "unknown",
                              "enum": [
                                "low",
                                "medium",
                                "high",
                                "unknown"
                              ],
                              "type": "string"
                            },
                            "scopeLockDate": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "startsOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "status": {
                              "default": "active",
                              "enum": [
                                "active",
                                "paused",
                                "completed",
                                "archived"
                              ],
                              "type": "string"
                            },
                            "team": {
                              "default": [],
                              "items": {
                                "properties": {
                                  "alias": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "allocationPct": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "role": {
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "role"
                                ],
                                "type": "object"
                              },
                              "maxItems": 100,
                              "type": "array"
                            }
                          },
                          "required": [
                            "name",
                            "startsOn",
                            "scopeLockDate"
                          ],
                          "type": "object"
                        },
                        "maxItems": 100,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "profile",
                      "commercial",
                      "projects"
                    ],
                    "type": "object"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "form",
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic create-read-update",
                    "value": {
                      "clientId": "11111111-1111-4111-8111-111111111111",
                      "connections": [],
                      "connectorWarning": true,
                      "form": {
                        "commercial": {
                          "billingFrequency": null,
                          "billingModel": "time_and_materials",
                          "blendedCostPerHourCents": null,
                          "contractedAmountCents": null,
                          "contractedHours": null,
                          "contractEnd": null,
                          "contractStart": "2026-10-01",
                          "currency": "USD",
                          "defaultBillingRatePerHourCents": null,
                          "hourlyBillingRateCents": null,
                          "includeAiToolingCosts": false,
                          "includeCloudCosts": false,
                          "includeContractorCosts": false,
                          "includeMeetingCosts": false,
                          "monthlyFeeCents": null,
                          "revenueSource": null,
                          "targetMarginPct": null
                        },
                        "profile": {
                          "accountManager": null,
                          "companyName": "Example customer",
                          "contactEmail": null,
                          "contactName": null,
                          "country": null,
                          "deliveryLead": null,
                          "industry": null,
                          "internalOwner": null,
                          "logoUrl": null,
                          "region": null,
                          "status": "active",
                          "timeZone": null,
                          "website": null
                        },
                        "projects": [
                          {
                            "budgetCents": null,
                            "description": null,
                            "endsOn": null,
                            "id": "22222222-2222-4222-8222-222222222222",
                            "initiatives": [],
                            "mappings": [],
                            "name": "Example delivery",
                            "objective": null,
                            "outcomeMetric": null,
                            "projectType": "Software delivery",
                            "rates": [],
                            "risk": "unknown",
                            "scopeLockDate": "2026-10-01",
                            "startsOn": "2026-10-01",
                            "status": "active",
                            "team": []
                          }
                        ]
                      },
                      "rowsAttributed": 0,
                      "version": 2
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clientId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "provider": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "provider",
                          "label",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "connectorWarning": {
                      "type": "boolean"
                    },
                    "form": {
                      "additionalProperties": false,
                      "properties": {
                        "commercial": {
                          "additionalProperties": false,
                          "properties": {
                            "billingFrequency": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "billingModel": {
                              "enum": [
                                "time_and_materials",
                                "fixed_price",
                                "retainer"
                              ],
                              "type": "string"
                            },
                            "blendedCostPerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedAmountCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractedHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractEnd": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contractStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "defaultBillingRatePerHourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "hourlyBillingRateCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "includeAiToolingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeCloudCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeContractorCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "includeMeetingCosts": {
                              "default": false,
                              "type": "boolean"
                            },
                            "monthlyFeeCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "revenueSource": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "targetMarginPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "billingModel",
                            "currency",
                            "contractStart",
                            "contractEnd",
                            "contractedAmountCents",
                            "contractedHours",
                            "targetMarginPct",
                            "billingFrequency",
                            "revenueSource",
                            "hourlyBillingRateCents",
                            "monthlyFeeCents",
                            "blendedCostPerHourCents",
                            "defaultBillingRatePerHourCents",
                            "includeCloudCosts",
                            "includeMeetingCosts",
                            "includeAiToolingCosts",
                            "includeContractorCosts"
                          ],
                          "type": "object"
                        },
                        "profile": {
                          "additionalProperties": false,
                          "properties": {
                            "accountManager": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "companyName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "contactEmail": {
                              "anyOf": [
                                {
                                  "format": "email",
                                  "maxLength": 320,
                                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "contactName": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "country": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "deliveryLead": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "industry": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "internalOwner": {
                              "anyOf": [
                                {
                                  "maxLength": 160,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "logoUrl": {
                              "anyOf": [
                                {
                                  "maxLength": 2048,
                                  "pattern": "^\\/workspaces\\/.*",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "region": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "status": {
                              "default": "active",
                              "enum": [
                                "active",
                                "archived"
                              ],
                              "type": "string"
                            },
                            "timeZone": {
                              "anyOf": [
                                {
                                  "maxLength": 80,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "website": {
                              "anyOf": [
                                {
                                  "format": "uri",
                                  "maxLength": 2048,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "companyName",
                            "industry",
                            "region",
                            "country",
                            "timeZone",
                            "contactName",
                            "contactEmail",
                            "website",
                            "logoUrl",
                            "internalOwner",
                            "accountManager",
                            "deliveryLead",
                            "status"
                          ],
                          "type": "object"
                        },
                        "projects": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "budgetCents": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "maxLength": 4000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "endsOn": {
                                "anyOf": [
                                  {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "initiatives": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "budgetCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "maxLength": 2000,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "name": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "priority": {
                                      "default": "none",
                                      "enum": [
                                        "high",
                                        "medium",
                                        "low",
                                        "none"
                                      ],
                                      "type": "string"
                                    },
                                    "source": {
                                      "const": "manual",
                                      "default": "manual",
                                      "type": "string"
                                    },
                                    "status": {
                                      "default": "planned",
                                      "enum": [
                                        "planned",
                                        "active",
                                        "completed",
                                        "cancelled"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "description",
                                    "budgetCents",
                                    "priority",
                                    "status",
                                    "source"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "mappings": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "connectionId": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "externalProjectKey": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "connectionId",
                                    "externalProjectKey"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "objective": {
                                "anyOf": [
                                  {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "outcomeMetric": {
                                "anyOf": [
                                  {
                                    "maxLength": 500,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "projectType": {
                                "anyOf": [
                                  {
                                    "maxLength": 120,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "rates": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amountCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "currency": {
                                      "pattern": "^[A-Z]{3}$",
                                      "type": "string"
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "default": "hour",
                                      "enum": [
                                        "hour",
                                        "day"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "amountCents",
                                    "currency",
                                    "unit"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              },
                              "risk": {
                                "default": "unknown",
                                "enum": [
                                  "low",
                                  "medium",
                                  "high",
                                  "unknown"
                                ],
                                "type": "string"
                              },
                              "scopeLockDate": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "startsOn": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "status": {
                                "default": "active",
                                "enum": [
                                  "active",
                                  "paused",
                                  "completed",
                                  "archived"
                                ],
                                "type": "string"
                              },
                              "team": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "alias": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "allocationPct": {
                                      "anyOf": [
                                        {
                                          "maximum": 100,
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "role": {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "alias",
                                    "role",
                                    "allocationPct"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 100,
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "projectType",
                              "status",
                              "startsOn",
                              "endsOn",
                              "scopeLockDate",
                              "budgetCents",
                              "objective",
                              "outcomeMetric",
                              "risk",
                              "description",
                              "team",
                              "rates",
                              "mappings",
                              "initiatives"
                            ],
                            "type": "object"
                          },
                          "maxItems": 100,
                          "type": "array"
                        }
                      },
                      "required": [
                        "profile",
                        "commercial",
                        "projects"
                      ],
                      "type": "object"
                    },
                    "rowsAttributed": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "version": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "clientId",
                    "form",
                    "version",
                    "connections",
                    "connectorWarning"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update a customer engagement",
        "tags": [
          "clients"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "clients.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "PATCH requires the latest nonnegative version; version zero configures an onboarding client without a profile.",
            "Writes require at least one project; omitting existing projects or initiatives does not delete them. All existing IDs must belong to the same client/project and workspace.",
            "Commercial and project end dates cannot precede start dates; duplicate mapping pairs and currency/unit constraints use the shared register refinements.",
            "Public writes preserve browser drafts; their normal version checks reject stale edits."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "clients:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/cloud-cost-lines": {
      "post": {
        "description": "Record an explicit billing line or monthly estimate, currency and allocation. Recurring estimates have no end date and remain estimated downstream. No vendor request or invented price. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "commercial.cloudCost",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-commercial.cloudCost",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "allocationPct": 50,
                    "amountCents": 12000,
                    "currency": "USD",
                    "periodEnd": "2026-10-07",
                    "periodStart": "2026-10-01",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "provider": "Example cloud",
                    "recurring": false,
                    "service": "compute"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "account": {
                    "anyOf": [
                      {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allocationPct": {
                    "default": 100,
                    "maximum": 100,
                    "minimum": 0,
                    "type": "number"
                  },
                  "amountCents": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "category": {
                    "default": "other",
                    "enum": [
                      "compute",
                      "database",
                      "storage",
                      "network",
                      "observability",
                      "ci_cd",
                      "ai_api",
                      "other"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "pattern": "^[A-Z]{3}$",
                    "type": "string"
                  },
                  "environment": {
                    "anyOf": [
                      {
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "periodEnd": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "periodStart": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "provider": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "recurring": {
                    "default": false,
                    "type": "boolean"
                  },
                  "service": {
                    "anyOf": [
                      {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "provider",
                  "periodStart",
                  "amountCents",
                  "currency"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "created": true,
                      "id": "11111111-1111-4111-8111-111111111111"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert a cloud cost line",
        "tags": [
          "commercial"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "commercial.edit",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "commercial:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/command-center": {
      "get": {
        "description": "Read the five delivery KPI families and the selected project's readiness and evidence sources for automation or an external dashboard. Optional clientId and projectId select an accessible dataset; when both are present they must refer to the same client. The response retains the app's selection and calculations. Start/end/tz travel together; omitted dates use the effective plan's reporting window. This is a single response with no pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.\n\nWhen clientId and projectId are both supplied, the project must belong to that client.",
        "operationId": "commandCenter.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "activeClientQuestion": {
                        "canEdit": false,
                        "question": null
                      },
                      "costEstimate": {
                        "launchDecision": null,
                        "source": null,
                        "status": "not_set"
                      },
                      "directory": {
                        "clients": [
                          {
                            "id": "00000000-0000-4000-8000-000000000005",
                            "name": "Hidden by selection"
                          },
                          {
                            "id": "33333333-3333-4333-8333-333333333333",
                            "name": "Synthetic visible client"
                          }
                        ],
                        "projects": [
                          {
                            "clientId": "00000000-0000-4000-8000-000000000005",
                            "id": "00000000-0000-4000-8000-000000000006",
                            "name": "Hidden by selection",
                            "status": "active"
                          },
                          {
                            "clientId": "33333333-3333-4333-8333-333333333333",
                            "id": "11111111-1111-4111-8111-111111111111",
                            "name": "Synthetic visible project",
                            "status": "active"
                          }
                        ],
                        "selectedClientId": "00000000-0000-4000-8000-000000000005",
                        "selectedProjectId": "00000000-0000-4000-8000-000000000006"
                      },
                      "engagementBaseline": {
                        "contractedAmount": false,
                        "scopeLockDate": false
                      },
                      "flow": {
                        "inputs": [
                          {
                            "color": "blue",
                            "count": 0,
                            "id": "tracker",
                            "label": "Tracker items",
                            "noun": "issues",
                            "state": "not_connected"
                          },
                          {
                            "color": "blue",
                            "count": 0,
                            "id": "code",
                            "label": "Code changes",
                            "noun": "changes",
                            "state": "not_connected"
                          },
                          {
                            "color": "purple",
                            "count": 0,
                            "id": "calendar",
                            "label": "Calendar",
                            "noun": "meetings",
                            "state": "not_connected"
                          },
                          {
                            "color": "purple",
                            "count": 0,
                            "id": "ai",
                            "label": "AI-assisted",
                            "noun": "assisted changes",
                            "state": "not_connected"
                          },
                          {
                            "color": "teal",
                            "count": 0,
                            "id": "release",
                            "label": "Releases",
                            "noun": "releases",
                            "state": "not_connected"
                          }
                        ],
                        "output": null
                      },
                      "insights": [
                        {
                          "body": "Report coverage is limited by **contracts** — not connected",
                          "id": "coverage:commercial",
                          "kind": "warn",
                          "meta": "0 of 5 sources reporting"
                        },
                        {
                          "body": "Report coverage is limited by **tracker** — not connected",
                          "id": "coverage:tracker",
                          "kind": "warn",
                          "meta": "0 of 5 sources reporting"
                        },
                        {
                          "body": "Report coverage is limited by **code** — not connected",
                          "id": "coverage:code",
                          "kind": "warn",
                          "meta": "0 of 5 sources reporting"
                        },
                        {
                          "body": "Report coverage is limited by **releases** — not connected",
                          "id": "coverage:release",
                          "kind": "warn",
                          "meta": "0 of 5 sources reporting"
                        },
                        {
                          "body": "Report coverage is limited by **calendar** — not connected",
                          "id": "coverage:calendar",
                          "kind": "warn",
                          "meta": "0 of 5 sources reporting"
                        }
                      ],
                      "kpis": [
                        {
                          "availability": "unavailable",
                          "context": "Add a contracted amount to an engagement to calculate delivery investment.",
                          "evidenceCount": 0,
                          "evidencePath": "/workspaces/22222222-2222-4222-8222-222222222222/command-center/evidence/delivery_investment?projectId=00000000-0000-4000-8000-000000000006",
                          "id": "delivery_investment",
                          "status": "warn",
                          "summary": "No contracted value",
                          "title": "Delivery Investment",
                          "value": null
                        },
                        {
                          "availability": "unavailable",
                          "context": "Scope expansion needs both an engagement start date and normalized work items.",
                          "evidenceCount": 0,
                          "evidencePath": "/workspaces/22222222-2222-4222-8222-222222222222/command-center/evidence/scope_expansion?projectId=00000000-0000-4000-8000-000000000006",
                          "id": "scope_expansion",
                          "status": "warn",
                          "summary": "No engagement baseline",
                          "title": "Scope expansion",
                          "value": null
                        },
                        {
                          "availability": "unavailable",
                          "context": "Connect a tracker and code host, or import normalized delivery evidence.",
                          "evidenceCount": 0,
                          "evidencePath": "/workspaces/22222222-2222-4222-8222-222222222222/command-center/evidence/delivery_output?projectId=00000000-0000-4000-8000-000000000006",
                          "id": "delivery_output",
                          "status": "warn",
                          "summary": "No delivery records",
                          "title": "Project forensics",
                          "value": null
                        },
                        {
                          "availability": "unavailable",
                          "context": "Objectives are currently represented by normalized epic-type work items.",
                          "evidenceCount": 0,
                          "evidencePath": "/workspaces/22222222-2222-4222-8222-222222222222/command-center/evidence/objectives?projectId=00000000-0000-4000-8000-000000000006",
                          "id": "objectives",
                          "status": "warn",
                          "summary": "No tracker data",
                          "title": "Objectives",
                          "value": null
                        },
                        {
                          "availability": "unavailable",
                          "context": "No merged PR or MR carries a self-reported AI-assisted signal, so there is nothing to compare against the non-assisted baseline.",
                          "evidenceCount": 0,
                          "evidencePath": "/workspaces/22222222-2222-4222-8222-222222222222/command-center/evidence/ai_net_gain?projectId=00000000-0000-4000-8000-000000000006",
                          "id": "ai_net_gain",
                          "status": "ai",
                          "summary": "No AI-assisted merges",
                          "title": "AI net delivery gain",
                          "value": null
                        }
                      ],
                      "readiness": {
                        "canManage": true,
                        "costInputs": {
                          "rates": 0,
                          "timeEntries": 0
                        },
                        "evidence": {
                          "codeChanges": {
                            "firstAt": null,
                            "inferredLinks": 0,
                            "inPeriod": 0,
                            "lastAt": null,
                            "lastRefreshedAt": null,
                            "linkedToWorkItems": 0,
                            "merged": 0,
                            "open": 0,
                            "projectRows": 0,
                            "sources": [],
                            "unattributedRows": 0
                          },
                          "workItems": {
                            "cancelled": 0,
                            "completed": 0,
                            "firstAt": null,
                            "inPeriod": 0,
                            "inProgress": 0,
                            "lastAt": null,
                            "lastRefreshedAt": null,
                            "projectRows": 0,
                            "sources": [],
                            "todo": 0,
                            "unattributedRows": 0
                          }
                        },
                        "roleBands": false,
                        "sources": {
                          "calendar": {
                            "health": "not_connected",
                            "providers": []
                          },
                          "code": {
                            "health": "not_connected",
                            "providers": []
                          },
                          "release": {
                            "health": "not_connected",
                            "providers": []
                          },
                          "tracker": {
                            "health": "not_connected",
                            "providers": []
                          }
                        }
                      },
                      "sources": [
                        {
                          "label": "Contracts",
                          "source": "commercial",
                          "state": "not_connected"
                        },
                        {
                          "label": "Tracker",
                          "source": "tracker",
                          "state": "not_connected"
                        },
                        {
                          "label": "Code",
                          "source": "code",
                          "state": "not_connected"
                        },
                        {
                          "label": "Releases",
                          "source": "release",
                          "state": "not_connected"
                        },
                        {
                          "label": "Calendar",
                          "source": "calendar",
                          "state": "not_connected"
                        }
                      ],
                      "state": "degraded"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "activeClientQuestion": {
                      "additionalProperties": false,
                      "properties": {
                        "canEdit": {
                          "type": "boolean"
                        },
                        "question": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "focus": {
                                      "enum": [
                                        "delivery",
                                        "investment",
                                        "scope"
                                      ],
                                      "type": "string"
                                    },
                                    "key": {
                                      "enum": [
                                        "delivery-progress",
                                        "investment-allocation",
                                        "scope-change"
                                      ],
                                      "type": "string"
                                    },
                                    "kind": {
                                      "const": "suggested",
                                      "type": "string"
                                    },
                                    "text": {
                                      "maxLength": 500,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "key",
                                    "text",
                                    "focus"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "focus": {
                                      "enum": [
                                        "delivery",
                                        "investment",
                                        "scope"
                                      ],
                                      "type": "string"
                                    },
                                    "kind": {
                                      "const": "custom",
                                      "type": "string"
                                    },
                                    "text": {
                                      "maxLength": 500,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "text",
                                    "focus"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "question",
                        "canEdit"
                      ],
                      "type": "object"
                    },
                    "costEstimate": {
                      "additionalProperties": false,
                      "properties": {
                        "launchDecision": {
                          "anyOf": [
                            {
                              "enum": [
                                "accepted_estimate",
                                "deferred"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "anyOf": [
                            {
                              "enum": [
                                "onboarding",
                                "editor"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "enum": [
                            "accepted_estimate",
                            "deferred",
                            "not_set"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "source",
                        "launchDecision"
                      ],
                      "type": "object"
                    },
                    "directory": {
                      "additionalProperties": false,
                      "properties": {
                        "clients": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "name": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "projects": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "clientId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "name": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "active",
                                  "paused",
                                  "completed",
                                  "archived"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "clientId",
                              "name",
                              "status"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "selectedClientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedProjectId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "clients",
                        "projects",
                        "selectedClientId",
                        "selectedProjectId"
                      ],
                      "type": "object"
                    },
                    "engagementBaseline": {
                      "additionalProperties": false,
                      "properties": {
                        "contractedAmount": {
                          "type": "boolean"
                        },
                        "scopeLockDate": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "contractedAmount",
                        "scopeLockDate"
                      ],
                      "type": "object"
                    },
                    "flow": {
                      "additionalProperties": false,
                      "properties": {
                        "buckets": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "amountCents": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "color": {
                                "enum": [
                                  "blue",
                                  "teal",
                                  "amber",
                                  "red",
                                  "purple"
                                ],
                                "type": "string"
                              },
                              "id": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "pct": {
                                "maximum": 100,
                                "minimum": 0,
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "amountCents",
                              "pct",
                              "color"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "inputs": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "color": {
                                "enum": [
                                  "blue",
                                  "teal",
                                  "amber",
                                  "red",
                                  "purple"
                                ],
                                "type": "string"
                              },
                              "count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "id": {
                                "enum": [
                                  "tracker",
                                  "code",
                                  "calendar",
                                  "ai",
                                  "release"
                                ],
                                "type": "string"
                              },
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "noun": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "state": {
                                "enum": [
                                  "data_present",
                                  "not_connected",
                                  "no_data"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "count",
                              "noun",
                              "color",
                              "state"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "output": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "amountCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "currency": {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                "label": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "amountCents",
                                "currency"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "inputs",
                        "output"
                      ],
                      "type": "object"
                    },
                    "insights": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "body": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "ok",
                              "warn",
                              "risk",
                              "ai"
                            ],
                            "type": "string"
                          },
                          "meta": {
                            "anyOf": [
                              {
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "body",
                          "meta"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "kpis": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "availability": {
                            "enum": [
                              "available",
                              "partial",
                              "unavailable"
                            ],
                            "type": "string"
                          },
                          "context": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "evidenceCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "evidencePath": {
                            "pattern": "^\\/workspaces\\/.*",
                            "type": "string"
                          },
                          "id": {
                            "enum": [
                              "delivery_investment",
                              "scope_expansion",
                              "delivery_output",
                              "objectives",
                              "ai_net_gain"
                            ],
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "ok",
                              "warn",
                              "risk",
                              "ai"
                            ],
                            "type": "string"
                          },
                          "summary": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "currency": {
                                        "pattern": "^[A-Z]{3}$",
                                        "type": "string"
                                      },
                                      "kind": {
                                        "const": "money",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "amountCents",
                                      "currency"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "currency": {
                                        "pattern": "^[A-Z]{3}$",
                                        "type": "string"
                                      },
                                      "hours": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "kind": {
                                        "const": "estimate",
                                        "type": "string"
                                      },
                                      "people": {
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991,
                                        "type": "integer"
                                      },
                                      "workingDays": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "amountCents",
                                      "currency",
                                      "hours",
                                      "people",
                                      "workingDays"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "currency": {
                                        "pattern": "^[A-Z]{3}$",
                                        "type": "string"
                                      },
                                      "estimated": {
                                        "type": "boolean"
                                      },
                                      "kind": {
                                        "const": "spend",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "amountCents",
                                      "currency",
                                      "estimated"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "addedHours": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "addedItems": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "addedPoints": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "kind": {
                                        "const": "scope",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "addedItems",
                                      "addedPoints",
                                      "addedHours"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "completedItems": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "items": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "kind": {
                                        "const": "delivery",
                                        "type": "string"
                                      },
                                      "mergedPullRequests": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "pullRequests": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "releases": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "items",
                                      "completedItems",
                                      "pullRequests",
                                      "mergedPullRequests",
                                      "releases"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "completed": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "kind": {
                                        "const": "objectives",
                                        "type": "string"
                                      },
                                      "total": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "total",
                                      "completed"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "assistedChanges": {
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991,
                                        "type": "integer"
                                      },
                                      "baselineChanges": {
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991,
                                        "type": "integer"
                                      },
                                      "implementationHoursSaved": {
                                        "type": "number"
                                      },
                                      "kind": {
                                        "const": "ai_gain",
                                        "type": "string"
                                      },
                                      "netHours": {
                                        "type": "number"
                                      },
                                      "reviewOverheadHours": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "assistedChanges",
                                      "baselineChanges",
                                      "implementationHoursSaved",
                                      "reviewOverheadHours",
                                      "netHours"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "status",
                          "availability",
                          "value",
                          "summary",
                          "context",
                          "evidenceCount",
                          "evidencePath"
                        ],
                        "type": "object"
                      },
                      "maxItems": 5,
                      "minItems": 5,
                      "type": "array"
                    },
                    "planningEstimate": {
                      "additionalProperties": false,
                      "properties": {
                        "currency": {
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        },
                        "monthlyCents": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "people": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "roles": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "monthlyCents",
                        "currency",
                        "people",
                        "roles"
                      ],
                      "type": "object"
                    },
                    "readiness": {
                      "additionalProperties": false,
                      "properties": {
                        "canManage": {
                          "type": "boolean"
                        },
                        "costInputs": {
                          "additionalProperties": false,
                          "properties": {
                            "rates": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "timeEntries": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "timeEntries",
                            "rates"
                          ],
                          "type": "object"
                        },
                        "evidence": {
                          "additionalProperties": false,
                          "properties": {
                            "codeChanges": {
                              "additionalProperties": false,
                              "properties": {
                                "firstAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "inferredLinks": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "inPeriod": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "lastAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastRefreshedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "linkedToWorkItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "merged": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "open": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "projectRows": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "sources": {
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "unattributedRows": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "projectRows",
                                "inPeriod",
                                "firstAt",
                                "lastAt",
                                "sources",
                                "lastRefreshedAt",
                                "unattributedRows",
                                "merged",
                                "open",
                                "linkedToWorkItems",
                                "inferredLinks"
                              ],
                              "type": "object"
                            },
                            "workItems": {
                              "additionalProperties": false,
                              "properties": {
                                "cancelled": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "completed": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "firstAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "inPeriod": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "inProgress": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "lastAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastRefreshedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "projectRows": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "sources": {
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "todo": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "unattributedRows": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "projectRows",
                                "inPeriod",
                                "firstAt",
                                "lastAt",
                                "sources",
                                "lastRefreshedAt",
                                "unattributedRows",
                                "completed",
                                "inProgress",
                                "todo",
                                "cancelled"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "workItems",
                            "codeChanges"
                          ],
                          "type": "object"
                        },
                        "roleBands": {
                          "type": "boolean"
                        },
                        "sources": {
                          "additionalProperties": {
                            "additionalProperties": false,
                            "properties": {
                              "health": {
                                "enum": [
                                  "not_connected",
                                  "syncing",
                                  "needs_reauth",
                                  "failing",
                                  "healthy"
                                ],
                                "type": "string"
                              },
                              "providers": {
                                "items": {
                                  "enum": [
                                    "jira",
                                    "github",
                                    "gitlab",
                                    "bitbucket",
                                    "linear",
                                    "azure_devops",
                                    "google_calendar",
                                    "microsoft_365",
                                    "slack",
                                    "teams",
                                    "copilot",
                                    "cursor",
                                    "claude_code",
                                    "claude_enterprise",
                                    "aws",
                                    "gcp",
                                    "azure_cost",
                                    "asana",
                                    "codex",
                                    "gemini",
                                    "cloudflare",
                                    "vercel",
                                    "fixture"
                                  ],
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "health",
                              "providers"
                            ],
                            "type": "object"
                          },
                          "propertyNames": {
                            "enum": [
                              "tracker",
                              "code",
                              "release",
                              "calendar"
                            ],
                            "type": "string"
                          },
                          "required": [
                            "tracker",
                            "code",
                            "release",
                            "calendar"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "canManage",
                        "roleBands",
                        "sources",
                        "costInputs"
                      ],
                      "type": "object"
                    },
                    "sources": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "projectRows": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "reason": {
                            "enum": [
                              "no_activity",
                              "unattributed",
                              "empty"
                            ],
                            "type": "string"
                          },
                          "source": {
                            "enum": [
                              "commercial",
                              "tracker",
                              "code",
                              "release",
                              "calendar"
                            ],
                            "type": "string"
                          },
                          "state": {
                            "enum": [
                              "data_present",
                              "not_connected",
                              "no_data"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "source",
                          "state",
                          "label"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "state": {
                      "enum": [
                        "complete",
                        "partial",
                        "degraded",
                        "empty"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "state",
                    "directory",
                    "sources",
                    "kpis"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read delivery intelligence",
        "tags": [
          "intelligence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "command_center.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
            "When clientId and projectId are both supplied, the project must belong to that client."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "command-center:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/command-center/evidence/{family}": {
      "get": {
        "description": "Trace one named Command Center family back to its bounded evidence items. Requires projectId and a supported family path value. This endpoint covers only the five published families, not other internal evidence routes. It shares the Command Center date-window policy and returns availability and explanation with the evidence. Evidence items are the service's bounded drilldown, not a cursor-paginated raw provider export. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
        "operationId": "commandCenter.evidence",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "delivery_output",
            "in": "path",
            "name": "family",
            "required": true,
            "schema": {
              "enum": [
                "delivery_investment",
                "scope_expansion",
                "delivery_output",
                "objectives",
                "ai_net_gain"
              ],
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-07",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "evidence": [],
                      "explanation": "Normalized work items, pull requests or merge requests, and releases counted for this project.",
                      "family": "delivery_output",
                      "title": "Project forensics"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "evidence": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "detail": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "engagement",
                              "work_item",
                              "code_change",
                              "release",
                              "calendar_event",
                              "ai_signal"
                            ],
                            "type": "string"
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "occurredAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reference": {
                            "anyOf": [
                              {
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "url": {
                            "anyOf": [
                              {
                                "format": "uri",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "reference",
                          "label",
                          "detail",
                          "source",
                          "occurredAt",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "explanation": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "family": {
                      "enum": [
                        "delivery_investment",
                        "scope_expansion",
                        "delivery_output",
                        "objectives",
                        "ai_net_gain"
                      ],
                      "type": "string"
                    },
                    "title": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "family",
                    "title",
                    "explanation",
                    "evidence"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Inspect a KPI evidence family",
        "tags": [
          "intelligence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "command_center.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "command-center:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/confidence": {
      "get": {
        "description": "Read a project's report confidence signals and evidence-backed setup checklist. Requires projectId and start/end/tz together; the current effective plan limits the reporting window. Missing signals remain null, and checklist providers explain where setup can improve evidence. The response is a single checklist, not a measure of individual performance or a paginated evidence export. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart, end and tz travel together; start must not follow end.\n\ntz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.\n\nprojectId and the complete reporting period are required.",
        "operationId": "confidence.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-07",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "checklist": [
                        {
                          "done": false,
                          "id": "ticket-pr-convention",
                          "meta": "No merged pull requests in this period",
                          "providers": []
                        },
                        {
                          "done": false,
                          "id": "project-mapping",
                          "meta": "No work items in this period",
                          "providers": []
                        },
                        {
                          "done": false,
                          "id": "calendar-tags",
                          "meta": "No active calendar source",
                          "providers": []
                        },
                        {
                          "done": false,
                          "id": "scope-lock",
                          "meta": "Set an engagement scope lock",
                          "providers": []
                        },
                        {
                          "done": false,
                          "id": "ai-marking",
                          "meta": "No explicitly tagged merged changes",
                          "providers": []
                        },
                        {
                          "done": false,
                          "evidence": {
                            "denominator": 0,
                            "numerator": 0,
                            "query": "Selected-project work items created, updated or completed in the report UTC period; normalized type other is unclassified."
                          },
                          "id": "work-type-classification",
                          "meta": "No work items in this period",
                          "providers": []
                        }
                      ],
                      "confidence": {
                        "hints": [
                          "Include ticket IDs in pull-request titles or branch names.",
                          "Map tracker work items to the client and project.",
                          "Tag calendar events with the client or project.",
                          "Add person-level rates for worked hours; role rates remain partial.",
                          "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                          "Connect deployment evidence to completed work items.",
                          "Connect a source or import evidence consistently to reduce manual-only coverage.",
                          "Reconnect or sync sources so their latest successful data is current.",
                          "Confirm or rectify the reporting assumptions used for this period."
                        ],
                        "label": "Low",
                        "score": 0,
                        "signals": [
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": 0,
                              "numerator": 0,
                              "query": "Merged code changes linked to normalized work items in the report period."
                            },
                            "id": "prs_linked",
                            "label": "PRs linked to tickets",
                            "note": "No merged PRs yet",
                            "pct": null,
                            "weight": 16
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": 0,
                              "numerator": 0,
                              "query": "Workspace work items in the report period with a normalized project mapping."
                            },
                            "id": "items_mapped",
                            "label": "Tickets mapped to client / project",
                            "note": "Workspace mapping coverage",
                            "pct": null,
                            "weight": 14
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": null,
                              "numerator": null,
                              "query": "An active Google Calendar connection is required before calendar tagging is measured."
                            },
                            "id": "meetings_tagged",
                            "label": "Meetings tagged to client / project",
                            "note": "No active calendar source",
                            "pct": null,
                            "weight": 12
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": 0,
                              "numerator": 0,
                              "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                            },
                            "id": "rate_card",
                            "label": "Rate card precision",
                            "note": "No labour hours in this period",
                            "pct": null,
                            "weight": 14
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": null,
                              "numerator": null,
                              "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                            },
                            "id": "ai_tagging",
                            "label": "AI-assisted work tagging",
                            "note": "Not tagged",
                            "pct": null,
                            "weight": 12
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": 0,
                              "numerator": 0,
                              "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                            },
                            "id": "release_evidence",
                            "label": "Release / deployment evidence",
                            "note": "Completed work with linked release evidence",
                            "pct": null,
                            "weight": 10
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": null,
                              "numerator": null,
                              "query": "Synced rather than manual or CSV evidence rows in the report context."
                            },
                            "id": "manual_entry_share",
                            "label": "Synced evidence share",
                            "note": "Synced evidence coverage",
                            "pct": null,
                            "weight": 8
                          },
                          {
                            "contribution": null,
                            "evidence": {
                              "denominator": 0,
                              "numerator": 0,
                              "query": "Latest successful sync per active connection, measured against the report period end."
                            },
                            "id": "freshness",
                            "label": "Source freshness",
                            "note": "No active sources",
                            "pct": null,
                            "weight": 8
                          },
                          {
                            "contribution": 0,
                            "evidence": {
                              "denominator": 6,
                              "numerator": 0,
                              "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                            },
                            "id": "assumptions",
                            "label": "Confirmed reporting assumptions",
                            "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                            "pct": 0,
                            "weight": 6
                          }
                        ]
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "checklist": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "done": {
                            "type": "boolean"
                          },
                          "evidence": {
                            "additionalProperties": false,
                            "properties": {
                              "denominator": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "numerator": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "query": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "numerator",
                              "denominator",
                              "query"
                            ],
                            "type": "object"
                          },
                          "id": {
                            "enum": [
                              "ticket-pr-convention",
                              "project-mapping",
                              "calendar-tags",
                              "scope-lock",
                              "ai-marking",
                              "work-type-classification"
                            ],
                            "type": "string"
                          },
                          "meta": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "providers": {
                            "items": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "id",
                          "done",
                          "meta"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "confidence": {
                      "additionalProperties": false,
                      "properties": {
                        "hints": {
                          "default": [],
                          "items": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "label": {
                          "default": "Not measured",
                          "enum": [
                            "High",
                            "Medium",
                            "Low",
                            "Not measured"
                          ],
                          "type": "string"
                        },
                        "score": {
                          "anyOf": [
                            {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "signals": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "contribution": {
                                "anyOf": [
                                  {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "evidence": {
                                "additionalProperties": false,
                                "default": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "Evidence path was not recorded in this historical snapshot."
                                },
                                "properties": {
                                  "denominator": {
                                    "anyOf": [
                                      {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "numerator": {
                                    "anyOf": [
                                      {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "query": {
                                    "default": "Evidence path was not recorded in this historical snapshot.",
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "numerator",
                                  "denominator",
                                  "query"
                                ],
                                "type": "object"
                              },
                              "id": {
                                "enum": [
                                  "prs_linked",
                                  "items_mapped",
                                  "meetings_tagged",
                                  "rate_card",
                                  "ai_tagging",
                                  "release_evidence",
                                  "manual_entry_share",
                                  "freshness",
                                  "assumptions"
                                ],
                                "type": "string"
                              },
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "note": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "pct": {
                                "anyOf": [
                                  {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "weight": {
                                "default": 1,
                                "exclusiveMinimum": 0,
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "pct",
                              "weight",
                              "contribution",
                              "evidence",
                              "note"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "score",
                        "label",
                        "signals",
                        "hints"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "confidence",
                    "checklist"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read report confidence and setup evidence",
        "tags": [
          "evidence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "assumptions.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start, end and tz travel together; start must not follow end.",
            "tz must be a recognized IANA time zone; explicit historical dates remain subject to the current effective reporting window.",
            "projectId and the complete reporting period are required."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "report-confidence:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/connections": {
      "get": {
        "description": "List the workspace connections and their current resource/sync availability as used by onboarding. Requires integrations.manage. The list includes safe connection identity and status, never provider credentials. This is the complete configured connection list with no pagination. Creating, reconnecting, testing or revoking a connection is outside this read operation. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "connections.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "connections": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "connection": {
                            "additionalProperties": false,
                            "properties": {
                              "createdAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "displayName": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "externalAccountId": {
                                "maxLength": 512,
                                "minLength": 1,
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "provider": {
                                "enum": [
                                  "jira",
                                  "github",
                                  "gitlab",
                                  "bitbucket",
                                  "linear",
                                  "azure_devops",
                                  "google_calendar",
                                  "microsoft_365",
                                  "slack",
                                  "teams",
                                  "copilot",
                                  "cursor",
                                  "claude_code",
                                  "claude_enterprise",
                                  "aws",
                                  "gcp",
                                  "azure_cost",
                                  "asana",
                                  "codex",
                                  "gemini",
                                  "cloudflare",
                                  "vercel",
                                  "fixture"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "active",
                                  "paused",
                                  "revoked",
                                  "error"
                                ],
                                "type": "string"
                              },
                              "updatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "workspaceId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "workspaceId",
                              "provider",
                              "externalAccountId",
                              "displayName",
                              "status",
                              "createdAt",
                              "updatedAt"
                            ],
                            "type": "object"
                          },
                          "implementationAvailable": {
                            "type": "boolean"
                          },
                          "needsReauth": {
                            "default": false,
                            "type": "boolean"
                          },
                          "streams": {
                            "default": [],
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "healthy": {
                                  "type": "boolean"
                                },
                                "recordsSynced": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "resource": {
                                  "enum": [
                                    "work_item",
                                    "code_change",
                                    "release",
                                    "calendar_event",
                                    "communication_signal",
                                    "ai_usage",
                                    "cloud_cost_line"
                                  ],
                                  "type": "string"
                                },
                                "verified": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "resource",
                                "verified",
                                "recordsSynced",
                                "healthy"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "connection",
                          "implementationAvailable",
                          "needsReauth",
                          "streams"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "connections"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List workspace source connections",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "data-sources:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/data-sources": {
      "get": {
        "description": "Monitor configured connector health, recent sync runs, dead-letter metadata, imports, scope mappings and non-secret cloud binding summaries. Requires the existing integrations.manage action. Availability reflects the deployed connector registry and setup configuration. Failure or missing evidence stays distinct from zero activity. Recent lists have the existing service bounds and no cursor; credential ciphertext, refresh tokens and provider secrets are excluded. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "dataSources.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "canManage": true,
                      "catalog": [
                        {
                          "availability": "coming_soon",
                          "category": "delivery",
                          "connectUrl": null,
                          "label": "Jira",
                          "provider": "jira",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "delivery",
                          "connectUrl": null,
                          "label": "Linear",
                          "provider": "linear",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "delivery",
                          "connectUrl": null,
                          "label": "Azure DevOps",
                          "provider": "azure_devops",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "delivery",
                          "connectUrl": null,
                          "label": "Asana",
                          "provider": "asana",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "code",
                          "connectUrl": null,
                          "label": "GitHub",
                          "provider": "github",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "code",
                          "connectUrl": null,
                          "label": "GitLab",
                          "provider": "gitlab",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "code",
                          "connectUrl": null,
                          "label": "Bitbucket",
                          "provider": "bitbucket",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "calendar",
                          "connectUrl": null,
                          "label": "Google Calendar",
                          "provider": "google_calendar",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "calendar",
                          "connectUrl": null,
                          "label": "Microsoft 365",
                          "provider": "microsoft_365",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "communication",
                          "connectUrl": null,
                          "label": "Slack",
                          "provider": "slack",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "communication",
                          "connectUrl": null,
                          "label": "Microsoft Teams",
                          "provider": "teams",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "ai",
                          "connectUrl": null,
                          "label": "GitHub Copilot",
                          "provider": "copilot",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "ai",
                          "connectUrl": null,
                          "label": "Cursor",
                          "provider": "cursor",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "ai",
                          "connectUrl": null,
                          "label": "Claude Code",
                          "provider": "claude_code",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "ai",
                          "connectUrl": null,
                          "label": "OpenAI Codex",
                          "provider": "codex",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "ai",
                          "connectUrl": null,
                          "label": "Gemini Code Assist",
                          "provider": "gemini",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "cloud",
                          "connectUrl": null,
                          "label": "AWS",
                          "provider": "aws",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "cloud",
                          "connectUrl": null,
                          "label": "Google Cloud",
                          "provider": "gcp",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "cloud",
                          "connectUrl": null,
                          "label": "Microsoft Azure",
                          "provider": "azure_cost",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "cloud",
                          "connectUrl": null,
                          "label": "Cloudflare",
                          "provider": "cloudflare",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "coming_soon",
                          "category": "cloud",
                          "connectUrl": null,
                          "label": "Vercel",
                          "provider": "vercel",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        },
                        {
                          "availability": "available",
                          "category": "import",
                          "connectUrl": null,
                          "label": "CSV import",
                          "provider": "csv",
                          "rateLimit": null,
                          "setupKind": null,
                          "skippedInSetup": [],
                          "supportsConnectionTest": false
                        }
                      ],
                      "connections": [],
                      "imports": null,
                      "kpis": {
                        "attentionCount": 0,
                        "connectedCount": 0,
                        "coveragePct": 0,
                        "lastSuccessAt": null,
                        "registeredCount": 0
                      },
                      "orphanedDeadLetters": [],
                      "projects": [
                        {
                          "clientName": "Hidden by selection",
                          "id": "00000000-0000-4000-8000-000000000006",
                          "name": "Hidden by selection"
                        },
                        {
                          "clientName": "Synthetic visible client",
                          "id": "11111111-1111-4111-8111-111111111111",
                          "name": "Synthetic visible project"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canManage": {
                      "type": "boolean"
                    },
                    "catalog": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "availability": {
                            "enum": [
                              "available",
                              "coming_soon"
                            ],
                            "type": "string"
                          },
                          "category": {
                            "enum": [
                              "delivery",
                              "code",
                              "calendar",
                              "communication",
                              "cloud",
                              "ai",
                              "import"
                            ],
                            "type": "string"
                          },
                          "connectUrl": {
                            "anyOf": [
                              {
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "provider": {
                            "enum": [
                              "jira",
                              "github",
                              "gitlab",
                              "bitbucket",
                              "linear",
                              "azure_devops",
                              "google_calendar",
                              "microsoft_365",
                              "slack",
                              "teams",
                              "copilot",
                              "cursor",
                              "claude_code",
                              "claude_enterprise",
                              "aws",
                              "gcp",
                              "azure_cost",
                              "asana",
                              "codex",
                              "gemini",
                              "cloudflare",
                              "vercel",
                              "csv"
                            ],
                            "type": "string"
                          },
                          "rateLimit": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "perMs": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  },
                                  "requests": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "requests",
                                  "perMs"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "setupKind": {
                            "anyOf": [
                              {
                                "enum": [
                                  "oauth",
                                  "credential",
                                  "github_app",
                                  "token",
                                  "role_grant"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "skippedInSetup": {
                            "default": [],
                            "items": {
                              "enum": [
                                "jira",
                                "linear",
                                "azure_devops",
                                "github_issues",
                                "asana",
                                "github",
                                "gitlab",
                                "bitbucket",
                                "azure_repos",
                                "google_calendar",
                                "microsoft_365",
                                "copilot",
                                "cursor",
                                "claude_code",
                                "codex",
                                "gemini",
                                "aws",
                                "azure_cost",
                                "gcp",
                                "cloudflare",
                                "vercel"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "supportsConnectionTest": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "provider",
                          "label",
                          "category",
                          "availability",
                          "connectUrl",
                          "setupKind",
                          "supportsConnectionTest",
                          "rateLimit",
                          "skippedInSetup"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "connections": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "binding": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "includeTax": {
                                        "type": "boolean"
                                      },
                                      "provider": {
                                        "const": "azure_cost",
                                        "type": "string"
                                      },
                                      "subscriptionId": {
                                        "maxLength": 200,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "tenantId": {
                                        "maxLength": 200,
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "subscriptionId",
                                      "tenantId",
                                      "includeTax"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "billingProject": {
                                        "maxLength": 200,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "dataset": {
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "exportProject": {
                                        "anyOf": [
                                          {
                                            "maxLength": 200,
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "includeTax": {
                                        "type": "boolean"
                                      },
                                      "projectIds": {
                                        "items": {
                                          "maxLength": 200,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "provider": {
                                        "const": "gcp",
                                        "type": "string"
                                      },
                                      "table": {
                                        "maxLength": 1024,
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "billingProject",
                                      "exportProject",
                                      "dataset",
                                      "table",
                                      "projectIds",
                                      "includeTax"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "connection": {
                            "additionalProperties": false,
                            "properties": {
                              "createdAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "displayName": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "externalAccountId": {
                                "maxLength": 512,
                                "minLength": 1,
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "provider": {
                                "enum": [
                                  "jira",
                                  "github",
                                  "gitlab",
                                  "bitbucket",
                                  "linear",
                                  "azure_devops",
                                  "google_calendar",
                                  "microsoft_365",
                                  "slack",
                                  "teams",
                                  "copilot",
                                  "cursor",
                                  "claude_code",
                                  "claude_enterprise",
                                  "aws",
                                  "gcp",
                                  "azure_cost",
                                  "asana",
                                  "codex",
                                  "gemini",
                                  "cloudflare",
                                  "vercel",
                                  "fixture"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "active",
                                  "paused",
                                  "revoked",
                                  "error"
                                ],
                                "type": "string"
                              },
                              "updatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "workspaceId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "workspaceId",
                              "provider",
                              "externalAccountId",
                              "displayName",
                              "status",
                              "createdAt",
                              "updatedAt"
                            ],
                            "type": "object"
                          },
                          "deadLetters": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "connectionId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deadLetteredAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "dequeueCount": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                "error": {
                                  "type": "string"
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "resolutionStatus": {
                                  "enum": [
                                    "unresolved",
                                    "retry_queued",
                                    "recovered",
                                    "acknowledged",
                                    "retry_failed"
                                  ],
                                  "type": "string"
                                },
                                "resolvedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "workspaceId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "workspaceId",
                                "connectionId",
                                "dequeueCount",
                                "error",
                                "deadLetteredAt",
                                "resolutionStatus",
                                "resolvedAt"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "implementationAvailable": {
                            "type": "boolean"
                          },
                          "meteredBudget": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "costPerRequestMicrousd": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "minRefreshIntervalMs": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "requestsPerDay": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "requestsPerDay",
                                  "costPerRequestMicrousd",
                                  "minRefreshIntervalMs"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "meteredRequestsToday": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "needsReauth": {
                            "default": false,
                            "type": "boolean"
                          },
                          "rateLimit": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "perMs": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  },
                                  "requests": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "requests",
                                  "perMs"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recentRuns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "attempt": {
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991,
                                  "type": "integer"
                                },
                                "connectionId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "error": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "finishedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "mode": {
                                  "enum": [
                                    "incremental",
                                    "backfill"
                                  ],
                                  "type": "string"
                                },
                                "pagesFetched": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "recordsUpserted": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "resource": {
                                  "enum": [
                                    "work_item",
                                    "code_change",
                                    "release",
                                    "calendar_event",
                                    "communication_signal",
                                    "ai_usage",
                                    "cloud_cost_line"
                                  ],
                                  "type": "string"
                                },
                                "startedAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "running",
                                    "succeeded",
                                    "failed",
                                    "dead_lettered"
                                  ],
                                  "type": "string"
                                },
                                "workspaceId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "workspaceId",
                                "connectionId",
                                "resource",
                                "mode",
                                "status",
                                "attempt",
                                "pagesFetched",
                                "recordsUpserted",
                                "error",
                                "startedAt",
                                "finishedAt"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "reconnectUrl": {
                            "anyOf": [
                              {
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revocation": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "attempts": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "detail": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "disposition": {
                                    "enum": [
                                      "pending",
                                      "revoked",
                                      "already_invalid",
                                      "customer_action_required",
                                      "not_applicable",
                                      "abandoned"
                                    ],
                                    "type": "string"
                                  },
                                  "trigger": {
                                    "enum": [
                                      "disconnect",
                                      "purge"
                                    ],
                                    "type": "string"
                                  },
                                  "updatedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "trigger",
                                  "disposition",
                                  "attempts",
                                  "detail",
                                  "updatedAt"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "scopeMappings": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "connectionId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "createdAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "projectId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "sourceScope": {
                                  "maxLength": 512,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "updatedAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "workspaceId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "workspaceId",
                                "connectionId",
                                "sourceScope",
                                "projectId",
                                "projectName",
                                "createdAt",
                                "updatedAt"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "setupKind": {
                            "anyOf": [
                              {
                                "enum": [
                                  "oauth",
                                  "credential",
                                  "github_app",
                                  "token",
                                  "role_grant"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "streams": {
                            "default": [],
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "healthy": {
                                  "type": "boolean"
                                },
                                "recordsSynced": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "resource": {
                                  "enum": [
                                    "work_item",
                                    "code_change",
                                    "release",
                                    "calendar_event",
                                    "communication_signal",
                                    "ai_usage",
                                    "cloud_cost_line"
                                  ],
                                  "type": "string"
                                },
                                "verified": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "resource",
                                "verified",
                                "recordsSynced",
                                "healthy"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "summary": {
                            "additionalProperties": false,
                            "properties": {
                              "attention": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "health": {
                                "enum": [
                                  "connected",
                                  "connected-warn",
                                  "needs-perm",
                                  "failed",
                                  "disconnected"
                                ],
                                "type": "string"
                              },
                              "lastSuccessAt": {
                                "anyOf": [
                                  {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "streams": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "streams",
                              "lastSuccessAt",
                              "attention",
                              "health"
                            ],
                            "type": "object"
                          },
                          "syncStates": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "backfillCompletedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "backfillCursor": {
                                  "anyOf": [
                                    {
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "connectionId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "consecutiveFailures": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "cursor": {
                                  "anyOf": [
                                    {
                                      "maxLength": 16384,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "lastError": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "lastSuccessAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastSyncedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "pausedUntil": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "pauseReason": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "provider_data_pending",
                                        "metered_budget",
                                        "refresh_interval"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "recordsSynced": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "resource": {
                                  "enum": [
                                    "work_item",
                                    "code_change",
                                    "release",
                                    "calendar_event",
                                    "communication_signal",
                                    "ai_usage",
                                    "cloud_cost_line"
                                  ],
                                  "type": "string"
                                },
                                "retryAfter": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "workspaceId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "workspaceId",
                                "connectionId",
                                "resource",
                                "cursor",
                                "backfillCursor",
                                "backfillCompletedAt",
                                "lastSyncedAt",
                                "lastSuccessAt",
                                "lastError",
                                "consecutiveFailures",
                                "retryAfter",
                                "recordsSynced",
                                "pausedUntil",
                                "pauseReason"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "connection",
                          "implementationAvailable",
                          "needsReauth",
                          "streams",
                          "revocation",
                          "reconnectUrl",
                          "binding",
                          "setupKind",
                          "rateLimit",
                          "meteredBudget",
                          "meteredRequestsToday",
                          "syncStates",
                          "recentRuns",
                          "deadLetters",
                          "scopeMappings",
                          "summary"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "imports": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "byKind": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "added": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "batchId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "committedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "fileName": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "rates",
                                      "budgets",
                                      "invoices",
                                      "cloud_cost",
                                      "time_entries",
                                      "work_items",
                                      "code_changes",
                                      "releases",
                                      "calendar_events",
                                      "ai_usage"
                                    ],
                                    "type": "string"
                                  },
                                  "rowCount": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "skipped": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "updated": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  }
                                },
                                "required": [
                                  "batchId",
                                  "kind",
                                  "fileName",
                                  "rowCount",
                                  "committedAt",
                                  "added",
                                  "updated",
                                  "skipped"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array"
                            },
                            "committedCount": {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            "latest": {
                              "additionalProperties": false,
                              "properties": {
                                "added": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "batchId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "committedAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "fileName": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "kind": {
                                  "enum": [
                                    "rates",
                                    "budgets",
                                    "invoices",
                                    "cloud_cost",
                                    "time_entries",
                                    "work_items",
                                    "code_changes",
                                    "releases",
                                    "calendar_events",
                                    "ai_usage"
                                  ],
                                  "type": "string"
                                },
                                "rowCount": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "skipped": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "updated": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "batchId",
                                "kind",
                                "fileName",
                                "rowCount",
                                "committedAt",
                                "added",
                                "updated",
                                "skipped"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "latest",
                            "byKind",
                            "committedCount"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "kpis": {
                      "additionalProperties": false,
                      "properties": {
                        "attentionCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "connectedCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "coveragePct": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "lastSuccessAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "registeredCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "connectedCount",
                        "registeredCount",
                        "lastSuccessAt",
                        "coveragePct",
                        "attentionCount"
                      ],
                      "type": "object"
                    },
                    "orphanedDeadLetters": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "connectionId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "deadLetteredAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "dequeueCount": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          },
                          "error": {
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "resolutionStatus": {
                            "enum": [
                              "unresolved",
                              "retry_queued",
                              "recovered",
                              "acknowledged",
                              "retry_failed"
                            ],
                            "type": "string"
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "workspaceId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "workspaceId",
                          "connectionId",
                          "dequeueCount",
                          "error",
                          "deadLetteredAt",
                          "resolutionStatus",
                          "resolvedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "projects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "clientName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "clientName"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "canManage",
                    "catalog",
                    "connections",
                    "projects",
                    "orphanedDeadLetters",
                    "kpis",
                    "imports"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read connector and import health",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "data-sources:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/directory": {
      "get": {
        "description": "Read clients, projects, delivery cadence and latest evidence dates for an accessible workspace or client/project filter. A filtered response recalculates project counts and the latest evidence date from the selected projects only; unmapped workspace evidence is omitted from that aggregate. Requires clients.read. Ordered names are returned as a single directory; no pagination or commercial detail is promised. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "directory.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "clients": [
                        {
                          "id": "00000000-0000-4000-8000-000000000005",
                          "name": "Hidden by selection",
                          "projectCount": 1,
                          "status": "active"
                        },
                        {
                          "id": "33333333-3333-4333-8333-333333333333",
                          "name": "Synthetic visible client",
                          "projectCount": 1,
                          "status": "active"
                        }
                      ],
                      "latestEvidenceDate": null,
                      "projects": [
                        {
                          "cadence": null,
                          "clientId": "00000000-0000-4000-8000-000000000005",
                          "id": "00000000-0000-4000-8000-000000000006",
                          "latestEvidenceDate": null,
                          "name": "Hidden by selection",
                          "status": "active"
                        },
                        {
                          "cadence": null,
                          "clientId": "33333333-3333-4333-8333-333333333333",
                          "id": "11111111-1111-4111-8111-111111111111",
                          "latestEvidenceDate": null,
                          "name": "Synthetic visible project",
                          "status": "active"
                        }
                      ],
                      "teamType": null
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clients": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "projectCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status",
                          "projectCount"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "latestEvidenceDate": {
                      "anyOf": [
                        {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "projects": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "cadence": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "anchorDate": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "lengthDays": {
                                    "maximum": 56,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "method": {
                                    "enum": [
                                      "scrum",
                                      "kanban"
                                    ],
                                    "type": "string"
                                  },
                                  "timeZone": {
                                    "maxLength": 64,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "method",
                                  "lengthDays",
                                  "anchorDate",
                                  "timeZone"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "latestEvidenceDate": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "paused",
                              "completed",
                              "archived"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "clientId",
                          "name",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "teamType": {
                      "anyOf": [
                        {
                          "enum": [
                            "agency",
                            "inhouse",
                            "external"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "clients",
                    "projects"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read the client and project directory",
        "tags": [
          "clients"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "clients.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "clients:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/engagements/{engagementId}/budget": {
      "patch": {
        "description": "Update stated contracted value, hours or both. Null removes the explicit value; absent fields stay unchanged. No invented pricing or subscription change. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "commercial.budget",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "22222222-2222-4222-8222-222222222222",
            "in": "path",
            "name": "engagementId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-commercial.budget",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "contractedAmountCents": 100000,
                    "contractedHours": 80
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "contractedAmountCents": {
                    "anyOf": [
                      {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contractedHours": {
                    "anyOf": [
                      {
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "updated": true
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "updated": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "updated"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update an engagement budget",
        "tags": [
          "commercial"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "commercial.edit",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "commercial:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/engagements/{engagementId}/rates": {
      "post": {
        "description": "Set a role/deidentified-person rate on an existing engagement with explicit currency, unit and effective interval. Existing composite identity updates instead of duplicating. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "commercial.rates",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "22222222-2222-4222-8222-222222222222",
            "in": "path",
            "name": "engagementId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-commercial.rates",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "amountCents": 12500,
                    "currency": "USD",
                    "effectiveFrom": "2026-10-01",
                    "role": "Engineer",
                    "unit": "hour"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "amountCents": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "currency": {
                    "pattern": "^[A-Z]{3}$",
                    "type": "string"
                  },
                  "effectiveFrom": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "effectiveTo": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "personExternalId": {
                    "anyOf": [
                      {
                        "maxLength": 512,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "role": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "unit": {
                    "enum": [
                      "hour",
                      "day"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "role",
                  "amountCents",
                  "currency",
                  "unit",
                  "effectiveFrom"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "created": true,
                      "id": "11111111-1111-4111-8111-111111111111"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert an engagement rate",
        "tags": [
          "commercial"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "commercial.edit",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "commercial:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/imports": {
      "get": {
        "description": "Inspect the latest 50 batches, newest first, including parsed/previewed uploads, which are not committed evidence. No pagination. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "batches": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "batches": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "committedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fileName": {
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "inserted": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "kind": {
                            "enum": [
                              "rates",
                              "budgets",
                              "invoices",
                              "cloud_cost",
                              "time_entries",
                              "work_items",
                              "code_changes",
                              "releases",
                              "calendar_events",
                              "ai_usage"
                            ],
                            "type": "string"
                          },
                          "rowCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "skipped": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "status": {
                            "enum": [
                              "parsed",
                              "previewed",
                              "committed",
                              "failed"
                            ],
                            "type": "string"
                          },
                          "updated": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "fileName",
                          "rowCount",
                          "inserted",
                          "updated",
                          "skipped",
                          "status",
                          "error",
                          "createdAt",
                          "committedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "batches"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List import batches",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:read",
          "stability": "stable"
        }
      },
      "post": {
        "description": "Upload raw UTF-8 delimited bytes, or UTF-16LE with BOM; never multipart. Maximum 5242880 bytes and 50000 rows. Query kind selects the evidence type. Send text/csv, text/plain or application/vnd.ms-excel and a bounded percent-encoded X-File-Name. The 20-row preview and deterministic alias mapping do not commit evidence or invoke a model. AI usage imports accept only the aggregate template and uniquely matching existing project names, refusing prompts/code/personal identifiers/unsupported columns before storage. Other unknown project names remain unattributed rather than creating projects. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.upload",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "time_entries",
            "in": "query",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "rates",
                "budgets",
                "invoices",
                "cloud_cost",
                "time_entries",
                "work_items",
                "code_changes",
                "releases",
                "calendar_events",
                "ai_usage"
              ],
              "type": "string"
            }
          },
          {
            "example": "example-imports.upload",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          },
          {
            "example": "example-time.csv",
            "in": "header",
            "name": "x-file-name",
            "required": false,
            "schema": {
              "maxLength": 1200,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "example": "text/csv",
            "in": "header",
            "name": "content-type",
            "required": true,
            "schema": {
              "pattern": "^(text\\/(csv|plain)|application\\/vnd\\.ms-excel)(;.*)?$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/vnd.ms-excel": {
              "schema": {
                "format": "binary",
                "minLength": 1,
                "type": "string",
                "x-maxBytes": 5242880
              }
            },
            "text/csv": {
              "schema": {
                "format": "binary",
                "minLength": 1,
                "type": "string",
                "x-maxBytes": 5242880
              }
            },
            "text/plain": {
              "schema": {
                "format": "binary",
                "minLength": 1,
                "type": "string",
                "x-maxBytes": 5242880
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "batchId": "11111111-1111-4111-8111-111111111111",
                      "fileName": "example-time.csv",
                      "headers": [
                        "Worked on",
                        "Hours",
                        "Person alias",
                        "Project"
                      ],
                      "kind": "time_entries",
                      "rowCount": 1,
                      "sampleRows": [
                        {
                          "Hours": "2",
                          "Person alias": "example-engineer",
                          "Project": "Example delivery",
                          "Worked on": "2026-10-01"
                        }
                      ],
                      "suggestedMapping": {
                        "columns": {
                          "billable": null,
                          "engagement": null,
                          "externalId": null,
                          "hours": "Hours",
                          "note": null,
                          "personExternalId": "Person alias",
                          "project": "Project",
                          "role": null,
                          "workedOn": "Worked on",
                          "workItemExternalKey": null
                        },
                        "options": {
                          "dateFormat": "iso",
                          "decimalSeparator": ".",
                          "hoursUnit": "hours"
                        }
                      },
                      "targetFields": [
                        {
                          "aliases": [
                            "workedOn",
                            "date",
                            "day",
                            "work date",
                            "spent on",
                            "Worked on"
                          ],
                          "field": "workedOn",
                          "label": "Worked on",
                          "required": true,
                          "type": "date"
                        },
                        {
                          "aliases": [
                            "hours",
                            "hours spent",
                            "duration",
                            "duration h",
                            "time",
                            "time spent",
                            "Hours"
                          ],
                          "field": "hours",
                          "label": "Hours",
                          "required": true,
                          "type": "number"
                        },
                        {
                          "aliases": [
                            "personExternalId",
                            "person",
                            "alias",
                            "member",
                            "user",
                            "initials",
                            "Person alias"
                          ],
                          "field": "personExternalId",
                          "help": "An alias, never a legal name.",
                          "label": "Person alias",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "role",
                            "position",
                            "grade",
                            "band",
                            "Role"
                          ],
                          "field": "role",
                          "label": "Role",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "billable",
                            "is billable",
                            "Billable"
                          ],
                          "field": "billable",
                          "label": "Billable",
                          "required": false,
                          "type": "boolean"
                        },
                        {
                          "aliases": [
                            "workItemExternalKey",
                            "ticket",
                            "issue",
                            "issue key",
                            "key",
                            "task",
                            "Work item key"
                          ],
                          "field": "workItemExternalKey",
                          "label": "Work item key",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "note",
                            "description",
                            "comment",
                            "details",
                            "Note"
                          ],
                          "field": "note",
                          "label": "Note",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "project",
                            "project name",
                            "project_name",
                            "engagement project",
                            "Project"
                          ],
                          "field": "project",
                          "help": "Matched to an existing project by name. Rows naming an unknown project are imported unattributed rather than creating one.",
                          "label": "Project",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "engagement",
                            "engagement name",
                            "contract",
                            "Engagement"
                          ],
                          "field": "engagement",
                          "label": "Engagement",
                          "required": false,
                          "type": "string"
                        },
                        {
                          "aliases": [
                            "externalId",
                            "id",
                            "entry id",
                            "time entry id",
                            "external id"
                          ],
                          "field": "externalId",
                          "label": "Entry ID",
                          "required": false,
                          "type": "string"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "batchId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "headers": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "rates",
                        "budgets",
                        "invoices",
                        "cloud_cost",
                        "time_entries",
                        "work_items",
                        "code_changes",
                        "releases",
                        "calendar_events",
                        "ai_usage"
                      ],
                      "type": "string"
                    },
                    "rowCount": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "sampleRows": {
                      "items": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "propertyNames": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "suggestedMapping": {
                      "additionalProperties": false,
                      "properties": {
                        "columns": {
                          "additionalProperties": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "propertyNames": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "options": {
                          "additionalProperties": false,
                          "default": {
                            "dateFormat": "iso",
                            "decimalSeparator": ".",
                            "hoursUnit": "hours"
                          },
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "dateFormat": {
                              "default": "iso",
                              "enum": [
                                "iso",
                                "dmy",
                                "mdy"
                              ],
                              "type": "string"
                            },
                            "decimalSeparator": {
                              "default": ".",
                              "enum": [
                                ".",
                                ","
                              ],
                              "type": "string"
                            },
                            "hoursUnit": {
                              "default": "hours",
                              "enum": [
                                "hours",
                                "minutes"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "dateFormat",
                            "decimalSeparator",
                            "hoursUnit"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "columns",
                        "options"
                      ],
                      "type": "object"
                    },
                    "targetFields": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "aliases": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "enumValues": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "field": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "help": {
                            "type": "string"
                          },
                          "label": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "type": {
                            "enum": [
                              "string",
                              "number",
                              "money",
                              "date",
                              "datetime",
                              "enum",
                              "percent",
                              "boolean"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "label",
                          "required",
                          "type",
                          "aliases"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "batchId",
                    "kind",
                    "fileName",
                    "headers",
                    "sampleRows",
                    "rowCount",
                    "suggestedMapping",
                    "targetFields"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upload a raw evidence file",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:write",
          "stability": "stable"
        },
        "x-wire-schema-override": "The HTTP body is bounded raw bytes; the runtime Uint8Array predicate checks byte length. JSON strings are not accepted as uploads."
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/imports/{batchId}/commit": {
      "post": {
        "description": "Atomically commit stored workspace-bound rows/mapping. Missing mapping or a closed batch returns 409. Invalid rows with skipInvalid false return 400 without evidence writes; true commits eligible rows and records bounded skips. AI aggregate imports require every row valid and refuse partial commits. Reimports update natural identities. Rates/budgets require an unambiguous engagement and explicit currency. Execution failure rolls back rows and records truthful failed history/audit separately. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.commit",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "batchId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-imports.commit",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "skipInvalid": false
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "skipInvalid": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "batchId": "11111111-1111-4111-8111-111111111111",
                      "inserted": 1,
                      "kind": "time_entries",
                      "skipped": 0,
                      "updated": 0
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "batchId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "inserted": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "rates",
                        "budgets",
                        "invoices",
                        "cloud_cost",
                        "time_entries",
                        "work_items",
                        "code_changes",
                        "releases",
                        "calendar_events",
                        "ai_usage"
                      ],
                      "type": "string"
                    },
                    "skipped": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "updated": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "batchId",
                    "kind",
                    "inserted",
                    "updated",
                    "skipped"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Commit a validated import",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/imports/{batchId}/skipped": {
      "get": {
        "description": "Read bounded operator-safe reasons for one stored workspace batch. No skips, absent historical reasons and truncated reasons stay distinct. Foreign/missing IDs return 404. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.skipped",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "batchId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "batchId": "11111111-1111-4111-8111-111111111111",
                      "recorded": true,
                      "rows": [],
                      "truncated": false
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "batchId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "recorded": {
                      "type": "boolean"
                    },
                    "rows": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "row": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "row",
                          "field",
                          "message"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "batchId",
                    "recorded",
                    "rows",
                    "truncated"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Inspect skipped-row reasons",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/imports/{batchId}/validate": {
      "post": {
        "description": "Save the chosen field-to-header mapping and validate uploaded rows, with date format, decimal separator, hours unit and optional currency. validRows, invalidRows, alreadyImported and repeatedInFile are distinct outcomes. No domain rows are committed. Deterministic suggestions do not call AI or charge tokens. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.validate",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "batchId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-imports.validate",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "columns": {
                      "billable": null,
                      "engagement": null,
                      "externalId": null,
                      "hours": "Hours",
                      "note": null,
                      "personExternalId": "Person alias",
                      "project": "Project",
                      "role": null,
                      "workedOn": "Worked on",
                      "workItemExternalKey": null
                    },
                    "options": {
                      "dateFormat": "iso",
                      "decimalSeparator": ".",
                      "hoursUnit": "hours"
                    }
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "columns": {
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "options": {
                    "default": {
                      "dateFormat": "iso",
                      "decimalSeparator": ".",
                      "hoursUnit": "hours"
                    },
                    "properties": {
                      "currency": {
                        "pattern": "^[A-Z]{3}$",
                        "type": "string"
                      },
                      "dateFormat": {
                        "default": "iso",
                        "enum": [
                          "iso",
                          "dmy",
                          "mdy"
                        ],
                        "type": "string"
                      },
                      "decimalSeparator": {
                        "default": ".",
                        "enum": [
                          ".",
                          ","
                        ],
                        "type": "string"
                      },
                      "hoursUnit": {
                        "default": "hours",
                        "enum": [
                          "hours",
                          "minutes"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "columns"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "alreadyImported": 0,
                      "batchId": "11111111-1111-4111-8111-111111111111",
                      "duplicates": 0,
                      "errors": [],
                      "errorsTruncated": false,
                      "invalidRows": 0,
                      "kind": "time_entries",
                      "repeatedInFile": 0,
                      "sample": [
                        {
                          "hours": 2,
                          "personExternalId": "example-engineer",
                          "project": "Example delivery",
                          "workedOn": "2026-10-01"
                        }
                      ],
                      "validRows": 1
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "alreadyImported": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "batchId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "duplicates": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "errors": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "row": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "row",
                          "field",
                          "message"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "errorsTruncated": {
                      "type": "boolean"
                    },
                    "invalidRows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "rates",
                        "budgets",
                        "invoices",
                        "cloud_cost",
                        "time_entries",
                        "work_items",
                        "code_changes",
                        "releases",
                        "calendar_events",
                        "ai_usage"
                      ],
                      "type": "string"
                    },
                    "repeatedInFile": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "sample": {
                      "items": {
                        "additionalProperties": {},
                        "propertyNames": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "validRows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "batchId",
                    "kind",
                    "validRows",
                    "invalidRows",
                    "alreadyImported",
                    "repeatedInFile",
                    "duplicates",
                    "errors",
                    "errorsTruncated",
                    "sample"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Confirm and validate a column mapping",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/imports/history": {
      "get": {
        "description": "Read the latest 100 committed/failed batches, optionally by kind. Counts cover the complete filtered history; uncommittedCount covers uploads excluded from history. Failed batches wrote no partial evidence. No pagination/export. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "imports.history",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "enum": [
                "rates",
                "budgets",
                "invoices",
                "cloud_cost",
                "time_entries",
                "work_items",
                "code_changes",
                "releases",
                "calendar_events",
                "ai_usage"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "batches": [],
                      "canImport": true,
                      "kindCounts": [],
                      "total": 0,
                      "totals": {
                        "added": 0,
                        "failed": 0,
                        "skipped": 0,
                        "updated": 0
                      },
                      "uncommittedCount": 0
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "batches": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorIsYou": {
                            "type": "boolean"
                          },
                          "actorName": {
                            "anyOf": [
                              {
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "added": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "at": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "auditEventId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fileName": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "rates",
                              "budgets",
                              "invoices",
                              "cloud_cost",
                              "time_entries",
                              "work_items",
                              "code_changes",
                              "releases",
                              "calendar_events",
                              "ai_usage"
                            ],
                            "type": "string"
                          },
                          "rowCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "skipped": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "skippedReasonsRecorded": {
                            "type": "boolean"
                          },
                          "status": {
                            "enum": [
                              "committed",
                              "failed"
                            ],
                            "type": "string"
                          },
                          "updated": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "fileName",
                          "rowCount",
                          "status",
                          "at",
                          "actorName",
                          "actorIsYou",
                          "added",
                          "updated",
                          "skipped",
                          "error",
                          "skippedReasonsRecorded",
                          "auditEventId"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canImport": {
                      "type": "boolean"
                    },
                    "kindCounts": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "count": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          },
                          "kind": {
                            "enum": [
                              "rates",
                              "budgets",
                              "invoices",
                              "cloud_cost",
                              "time_entries",
                              "work_items",
                              "code_changes",
                              "releases",
                              "calendar_events",
                              "ai_usage"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "count"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "total": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "totals": {
                      "additionalProperties": false,
                      "properties": {
                        "added": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "failed": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "skipped": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updated": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "added",
                        "updated",
                        "skipped",
                        "failed"
                      ],
                      "type": "object"
                    },
                    "uncommittedCount": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "batches",
                    "kindCounts",
                    "total",
                    "uncommittedCount",
                    "totals",
                    "canImport"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read committed and failed history",
        "tags": [
          "imports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "integrations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "imports:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations": {
      "get": {
        "description": "Read cases filtered by existing project/customer. Open cases sort before resolved/filed cases, then period and creation newest first. No pagination. Availability is independent of a measured zero. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "canManage": true,
                      "cases": [
                        {
                          "clientId": "22222222-2222-4222-8222-222222222222",
                          "closedAt": null,
                          "confidence": 25,
                          "createdAt": "2026-10-01T07:59:39.642Z",
                          "flagCount": 2,
                          "graphState": {
                            "overlay": "all",
                            "panelOpen": true,
                            "positions": {},
                            "selected": null
                          },
                          "id": "33333333-3333-4333-8333-333333333333",
                          "ownerName": "Example owner",
                          "ownerUserId": "00000000-0000-4000-8000-000000000008",
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "status": "Investigating",
                          "subtitle": "Establish the chain of evidence",
                          "timeZone": "UTC",
                          "title": "Example delivery review",
                          "typology": null,
                          "unresolvedFlagCount": 2,
                          "updatedAt": "2026-10-01T07:59:39.642Z",
                          "version": 1
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canManage": {
                      "type": "boolean"
                    },
                    "cases": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "closedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "confidence": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "flagCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "graphState": {
                            "additionalProperties": false,
                            "properties": {
                              "overlay": {
                                "default": "all",
                                "enum": [
                                  "all",
                                  "expansion",
                                  "acdrift",
                                  "rework",
                                  "untraced",
                                  "cost"
                                ],
                                "type": "string"
                              },
                              "panelOpen": {
                                "default": false,
                                "type": "boolean"
                              },
                              "positions": {
                                "additionalProperties": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "x": {
                                      "type": "number"
                                    },
                                    "y": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "x",
                                    "y"
                                  ],
                                  "type": "object"
                                },
                                "default": {},
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "selected": {
                                "anyOf": [
                                  {
                                    "maxLength": 900,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "selected",
                              "overlay",
                              "panelOpen",
                              "positions"
                            ],
                            "type": "object"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "ownerName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "ownerUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "periodEnd": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "periodStart": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "projectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "Open",
                              "Investigating",
                              "Evidence gathered",
                              "Disposition",
                              "Resolved",
                              "Filed"
                            ],
                            "type": "string"
                          },
                          "subtitle": {
                            "maxLength": 300,
                            "type": "string"
                          },
                          "timeZone": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "anyOf": [
                              {
                                "enum": [
                                  "expansion",
                                  "acdrift",
                                  "rework",
                                  "untraced",
                                  "cost"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unresolvedFlagCount": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "projectId",
                          "clientId",
                          "periodStart",
                          "periodEnd",
                          "timeZone",
                          "typology",
                          "title",
                          "subtitle",
                          "status",
                          "ownerUserId",
                          "ownerName",
                          "confidence",
                          "flagCount",
                          "unresolvedFlagCount",
                          "graphState",
                          "version",
                          "createdAt",
                          "updatedAt",
                          "closedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "cases",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List delivery investigations",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:read",
          "stability": "stable"
        }
      },
      "post": {
        "description": "Create a case for an existing customer/project pair and ordered reporting interval. Flags seed from the existing deterministic forensics graph, with current baseline provenance. No source evidence or AI grouping is invented. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.create",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.create",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "clientId": "22222222-2222-4222-8222-222222222222",
                    "end": "2026-03-31",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "start": "2026-01-01",
                    "title": "Example delivery review",
                    "tz": "UTC"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "end": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "start": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  },
                  "typology": {
                    "anyOf": [
                      {
                        "enum": [
                          "expansion",
                          "acdrift",
                          "rework",
                          "untraced",
                          "cost"
                        ],
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "tz": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "start",
                  "end",
                  "projectId",
                  "clientId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": null,
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Investigating",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example delivery review",
                        "typology": null,
                        "unresolvedFlagCount": 2,
                        "updatedAt": "2026-10-01T07:59:39.642Z",
                        "version": 1
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        }
                      ],
                      "notes": [],
                      "packages": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Open a delivery investigation",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}": {
      "get": {
        "description": "Read case, sourced flags, dispositions, notes, packages and audit history. Opaque case IDs retain the application's full-scope authorization; passing a project hint does not broaden a restricted grant. Evidence absence and inference remain visible. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.780Z",
                          "id": "00000000-0000-4000-8000-000000000014",
                          "kind": "investigation.case.updated",
                          "payload": {
                            "after": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review"
                            },
                            "before": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example delivery review"
                            }
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.797Z",
                          "id": "00000000-0000-4000-8000-000000000015",
                          "kind": "investigation.note.added",
                          "payload": {
                            "after": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555",
                            "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.814Z",
                          "id": "00000000-0000-4000-8000-000000000017",
                          "kind": "investigation.note.edited",
                          "payload": {
                            "after": {
                              "body": "Correction: retain the evidence link and state the remaining uncertainty."
                            },
                            "before": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.852Z",
                          "id": "00000000-0000-4000-8000-000000000019",
                          "kind": "investigation.flag.dispositioned",
                          "payload": {
                            "after": {
                              "disposition": "inscope",
                              "rationale": "Reviewed the synthetic delivery evidence"
                            },
                            "before": {
                              "disposition": null,
                              "rationale": null
                            },
                            "flagId": "44444444-4444-4444-8444-444444444444",
                            "nodeIds": [
                              "wi-00000000-0000-4000-8000-000000000009"
                            ],
                            "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.893Z",
                          "id": "00000000-0000-4000-8000-000000000020",
                          "kind": "investigation.flag.dispositioned",
                          "payload": {
                            "after": {
                              "disposition": "inscope",
                              "rationale": "Reviewed the synthetic delivery evidence"
                            },
                            "before": {
                              "disposition": null,
                              "rationale": null
                            },
                            "flagId": "00000000-0000-4000-8000-000000000010",
                            "nodeIds": [
                              "wi-00000000-0000-4000-8000-000000000011"
                            ],
                            "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:40.047Z",
                          "id": "00000000-0000-4000-8000-000000000023",
                          "kind": "investigation.package.created",
                          "payload": {
                            "claims": 2,
                            "contentHash": "3de1f3ff28b41bca9750f4ecc4583b697a3ce58bd5785ea06a00c9c7b3719bf4",
                            "draft": false,
                            "engine": "template",
                            "kind": "memo",
                            "packageId": "66666666-6666-4666-8666-666666666666"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:40.254Z",
                          "id": "00000000-0000-4000-8000-000000000024",
                          "kind": "investigation.package.attached",
                          "payload": {
                            "packageId": "66666666-6666-4666-8666-666666666666",
                            "reportId": "77777777-7777-4777-8777-777777777777",
                            "reportSnapshotId": "00000000-0000-4000-8000-000000000021"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": "2026-10-01T07:59:39.890Z",
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Filed",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example evidence review",
                        "typology": null,
                        "unresolvedFlagCount": 0,
                        "updatedAt": "2026-10-01T07:59:40.043Z",
                        "version": 7
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": "inscope",
                          "history": [
                            {
                              "actorName": "Example owner",
                              "actorUserId": "00000000-0000-4000-8000-000000000008",
                              "at": "2026-10-01T07:59:39.849Z",
                              "auditEventId": "00000000-0000-4000-8000-000000000019",
                              "from": null,
                              "id": "00000000-0000-4000-8000-000000000018",
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "to": "inscope"
                            }
                          ],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": "Reviewed the synthetic delivery evidence",
                          "resolvedAt": "2026-10-01T07:59:39.849Z",
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 2
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": "inscope",
                          "history": [
                            {
                              "actorName": "Example owner",
                              "actorUserId": "00000000-0000-4000-8000-000000000008",
                              "at": "2026-10-01T07:59:39.890Z",
                              "auditEventId": "00000000-0000-4000-8000-000000000020",
                              "from": null,
                              "id": "00000000-0000-4000-8000-000000000022",
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "to": "inscope"
                            }
                          ],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": "Reviewed the synthetic delivery evidence",
                          "resolvedAt": "2026-10-01T07:59:39.890Z",
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 2
                        }
                      ],
                      "notes": [
                        {
                          "authorName": "Example owner",
                          "authorUserId": "00000000-0000-4000-8000-000000000008",
                          "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "createdAt": "2026-10-01T07:59:39.794Z",
                          "editedAt": "2026-10-01T07:59:39.812Z",
                          "history": [
                            {
                              "at": "2026-10-01T07:59:39.812Z",
                              "body": "Delivery evidence supports this observation; inference remains separate.",
                              "editedByName": "Example owner",
                              "editedByUserId": "00000000-0000-4000-8000-000000000008",
                              "id": "00000000-0000-4000-8000-000000000016"
                            }
                          ],
                          "id": "55555555-5555-4555-8555-555555555555",
                          "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                        }
                      ],
                      "packages": [
                        {
                          "attachedAt": "2026-10-01T07:59:40.228Z",
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "contentHash": "3de1f3ff28b41bca9750f4ecc4583b697a3ce58bd5785ea06a00c9c7b3719bf4",
                          "createdAt": "2026-10-01T07:59:40.043Z",
                          "createdByName": "Example owner",
                          "createdByUserId": "00000000-0000-4000-8000-000000000008",
                          "id": "66666666-6666-4666-8666-666666666666",
                          "kind": "memo",
                          "reportId": "77777777-7777-4777-8777-777777777777",
                          "reportSnapshotId": "00000000-0000-4000-8000-000000000021",
                          "snapshot": {
                            "case": {
                              "agencyName": "Synthetic investigations",
                              "clientName": "example Retail",
                              "confidence": 25,
                              "id": "33333333-3333-4333-8333-333333333333",
                              "periodEnd": "2026-03-31",
                              "periodLabel": "Q1 2026",
                              "periodStart": "2026-01-01",
                              "projectName": "example Checkout Replatform",
                              "status": "Filed",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review",
                              "typology": null
                            },
                            "claims": [
                              {
                                "auditEventIds": [
                                  "00000000-0000-4000-8000-000000000019"
                                ],
                                "id": "claim:44444444-4444-4444-8444-444444444444",
                                "nodeIds": [
                                  "wi-00000000-0000-4000-8000-000000000009"
                                ],
                                "text": "Refunds fail for split tender added after lock — In scope: Reviewed the synthetic delivery evidence ($1,800)"
                              },
                              {
                                "auditEventIds": [
                                  "00000000-0000-4000-8000-000000000020"
                                ],
                                "id": "claim:00000000-0000-4000-8000-000000000010",
                                "nodeIds": [
                                  "wi-00000000-0000-4000-8000-000000000011"
                                ],
                                "text": "Loyalty points at checkout added after lock — In scope: Reviewed the synthetic delivery evidence ($4,800)"
                              }
                            ],
                            "custody": {
                              "wi-00000000-0000-4000-8000-000000000009": [
                                {
                                  "id": "EXAMPLE-42",
                                  "kind": "jira",
                                  "meta": "Added Feb 20 · post-lock",
                                  "t": "Refunds fail for split tender"
                                },
                                {
                                  "id": "MR !7",
                                  "kind": "pr",
                                  "meta": "Merged Mar 02",
                                  "t": "Split tender refund path"
                                }
                              ],
                              "wi-00000000-0000-4000-8000-000000000011": [
                                {
                                  "id": "EXAMPLE-77",
                                  "kind": "jira",
                                  "meta": "Added Mar 05 · post-lock",
                                  "t": "Loyalty points at checkout"
                                }
                              ]
                            },
                            "draft": false,
                            "engine": "template",
                            "flags": [
                              {
                                "auditEventIds": [
                                  "00000000-0000-4000-8000-000000000019"
                                ],
                                "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                                "disposition": "inscope",
                                "dispositionLabel": "In scope",
                                "evidenceMissing": false,
                                "id": "44444444-4444-4444-8444-444444444444",
                                "impact": "$1,800",
                                "impactCents": 180000,
                                "nodeIds": [
                                  "wi-00000000-0000-4000-8000-000000000009"
                                ],
                                "rationale": "Reviewed the synthetic delivery evidence",
                                "resolvedAt": "2026-10-01T07:59:39.849Z",
                                "severity": "amber",
                                "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                                "title": "Refunds fail for split tender added after lock",
                                "typology": "added-after-lock"
                              },
                              {
                                "auditEventIds": [
                                  "00000000-0000-4000-8000-000000000020"
                                ],
                                "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                                "disposition": "inscope",
                                "dispositionLabel": "In scope",
                                "evidenceMissing": false,
                                "id": "00000000-0000-4000-8000-000000000010",
                                "impact": "$4,800",
                                "impactCents": 480000,
                                "nodeIds": [
                                  "wi-00000000-0000-4000-8000-000000000011"
                                ],
                                "rationale": "Reviewed the synthetic delivery evidence",
                                "resolvedAt": "2026-10-01T07:59:39.890Z",
                                "severity": "amber",
                                "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                                "title": "Loyalty points at checkout added after lock",
                                "typology": "added-after-lock"
                              }
                            ],
                            "generatedAt": "2026-10-01T07:59:40.042Z",
                            "kind": "memo",
                            "notes": [
                              {
                                "at": "2026-10-01T07:59:39.794Z",
                                "auditEventIds": [
                                  "00000000-0000-4000-8000-000000000015",
                                  "00000000-0000-4000-8000-000000000017"
                                ],
                                "authorName": "Example owner",
                                "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                                "id": "55555555-5555-4555-8555-555555555555",
                                "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                              }
                            ],
                            "prose": {
                              "sections": [
                                {
                                  "body": "Evidence is traced node by node from the scope locked on 2026-01-01 through 1 release; case confidence stands at 25%.",
                                  "heading": "What moved after the lock"
                                },
                                {
                                  "body": "Confirmed in scope and absorbed: $6,600.",
                                  "heading": "Dispositions"
                                },
                                {
                                  "body": "Each claim links back to the source records and to the audit events that produced it. The subject throughout is the delivery and the scope, never an individual.",
                                  "heading": "How to read this memo"
                                }
                              ],
                              "summary": "$6,600 of delivery investment on example Checkout Replatform for example Retail during Q1 2026 is accounted for line by line below. Every one of the 2 flags carries a disposition with a rationale.",
                              "title": "Invoice-defense memo · example Checkout Replatform · Q1 2026"
                            },
                            "provenance": {
                              "graphBuild": null,
                              "lock": {
                                "approvalRef": null,
                                "authority": null,
                                "effectiveAt": "2026-01-02T00:00:00.000Z",
                                "lockedOn": "2026-01-01",
                                "lockId": null,
                                "memberCount": null,
                                "provenance": "engagement_starts_on",
                                "reconstructed": true,
                                "resolverVersion": "lock-resolver@1",
                                "timeZone": "UTC",
                                "version": null
                              }
                            },
                            "version": 1,
                            "watermark": null
                          },
                          "status": "final"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Retrieve an investigation and its evidence",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:read",
          "stability": "stable"
        }
      },
      "patch": {
        "description": "Supply current case version. Title, subtitle or status needs investigations.manage; a canvas-only change needs investigations.note, including on receipt replay. Stale versions return 409. Existing status transitions and package gates apply. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.update",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.update",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "title": "Example evidence review",
                    "version": 1
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "graphState": {
                    "properties": {
                      "overlay": {
                        "enum": [
                          "all",
                          "expansion",
                          "acdrift",
                          "rework",
                          "untraced",
                          "cost"
                        ],
                        "type": "string"
                      },
                      "panelOpen": {
                        "type": "boolean"
                      },
                      "positions": {
                        "additionalProperties": {
                          "properties": {
                            "x": {
                              "type": "number"
                            },
                            "y": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ],
                          "type": "object"
                        },
                        "propertyNames": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "selected": {
                        "anyOf": [
                          {
                            "maxLength": 900,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "enum": [
                      "Open",
                      "Investigating",
                      "Evidence gathered",
                      "Disposition",
                      "Resolved",
                      "Filed"
                    ],
                    "type": "string"
                  },
                  "subtitle": {
                    "maxLength": 300,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.780Z",
                          "id": "00000000-0000-4000-8000-000000000014",
                          "kind": "investigation.case.updated",
                          "payload": {
                            "after": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review"
                            },
                            "before": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example delivery review"
                            }
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": null,
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Investigating",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example evidence review",
                        "typology": null,
                        "unresolvedFlagCount": 2,
                        "updatedAt": "2026-10-01T07:59:39.777Z",
                        "version": 2
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        }
                      ],
                      "notes": [],
                      "packages": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update a case or shared canvas",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.note",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}/flags/{flagId}/disposition": {
      "post": {
        "description": "Supply the current flag version, disposition and required rationale. The flag must belong to this case and tenant. Existing confidence/status calculation and append-only disposition history apply; inference does not become source evidence. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.disposition",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "44444444-4444-4444-8444-444444444444",
            "in": "path",
            "name": "flagId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.disposition",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "disposition": "inscope",
                    "rationale": "Reviewed the synthetic delivery evidence",
                    "version": 1
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "disposition": {
                    "enum": [
                      "inscope",
                      "cr",
                      "billable",
                      "writeoff",
                      "decision"
                    ],
                    "type": "string"
                  },
                  "rationale": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "version",
                  "disposition",
                  "rationale"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.780Z",
                          "id": "00000000-0000-4000-8000-000000000014",
                          "kind": "investigation.case.updated",
                          "payload": {
                            "after": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review"
                            },
                            "before": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example delivery review"
                            }
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.797Z",
                          "id": "00000000-0000-4000-8000-000000000015",
                          "kind": "investigation.note.added",
                          "payload": {
                            "after": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555",
                            "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.814Z",
                          "id": "00000000-0000-4000-8000-000000000017",
                          "kind": "investigation.note.edited",
                          "payload": {
                            "after": {
                              "body": "Correction: retain the evidence link and state the remaining uncertainty."
                            },
                            "before": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.852Z",
                          "id": "00000000-0000-4000-8000-000000000019",
                          "kind": "investigation.flag.dispositioned",
                          "payload": {
                            "after": {
                              "disposition": "inscope",
                              "rationale": "Reviewed the synthetic delivery evidence"
                            },
                            "before": {
                              "disposition": null,
                              "rationale": null
                            },
                            "flagId": "44444444-4444-4444-8444-444444444444",
                            "nodeIds": [
                              "wi-00000000-0000-4000-8000-000000000009"
                            ],
                            "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": null,
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Disposition",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example evidence review",
                        "typology": null,
                        "unresolvedFlagCount": 1,
                        "updatedAt": "2026-10-01T07:59:39.849Z",
                        "version": 5
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": "inscope",
                          "history": [
                            {
                              "actorName": "Example owner",
                              "actorUserId": "00000000-0000-4000-8000-000000000008",
                              "at": "2026-10-01T07:59:39.849Z",
                              "auditEventId": "00000000-0000-4000-8000-000000000019",
                              "from": null,
                              "id": "00000000-0000-4000-8000-000000000018",
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "to": "inscope"
                            }
                          ],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": "Reviewed the synthetic delivery evidence",
                          "resolvedAt": "2026-10-01T07:59:39.849Z",
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 2
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        }
                      ],
                      "notes": [
                        {
                          "authorName": "Example owner",
                          "authorUserId": "00000000-0000-4000-8000-000000000008",
                          "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "createdAt": "2026-10-01T07:59:39.794Z",
                          "editedAt": "2026-10-01T07:59:39.812Z",
                          "history": [
                            {
                              "at": "2026-10-01T07:59:39.812Z",
                              "body": "Delivery evidence supports this observation; inference remains separate.",
                              "editedByName": "Example owner",
                              "editedByUserId": "00000000-0000-4000-8000-000000000008",
                              "id": "00000000-0000-4000-8000-000000000016"
                            }
                          ],
                          "id": "55555555-5555-4555-8555-555555555555",
                          "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                        }
                      ],
                      "packages": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Record a sourced flag disposition",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}/notes": {
      "post": {
        "description": "Attach a bounded note to a supported delivery node of this case's project. Legacy graph IDs must exist in the project graph; canonical evidence keys must name a live canonical entity. A person/client cannot be the subject. investigation.note permission is distinct from management. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.noteCreate",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.noteCreate",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "body": "Delivery evidence supports this observation; inference remains separate.",
                    "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "body": {
                    "maxLength": 4000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "targetNodeId": {
                    "maxLength": 900,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "targetNodeId",
                  "body"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.780Z",
                          "id": "00000000-0000-4000-8000-000000000014",
                          "kind": "investigation.case.updated",
                          "payload": {
                            "after": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review"
                            },
                            "before": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example delivery review"
                            }
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.797Z",
                          "id": "00000000-0000-4000-8000-000000000015",
                          "kind": "investigation.note.added",
                          "payload": {
                            "after": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555",
                            "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": null,
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Investigating",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example evidence review",
                        "typology": null,
                        "unresolvedFlagCount": 2,
                        "updatedAt": "2026-10-01T07:59:39.794Z",
                        "version": 3
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        }
                      ],
                      "notes": [
                        {
                          "authorName": "Example owner",
                          "authorUserId": "00000000-0000-4000-8000-000000000008",
                          "body": "Delivery evidence supports this observation; inference remains separate.",
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "createdAt": "2026-10-01T07:59:39.794Z",
                          "editedAt": null,
                          "history": [],
                          "id": "55555555-5555-4555-8555-555555555555",
                          "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                        }
                      ],
                      "packages": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add a note on supported delivery evidence",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.note",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}/notes/{noteId}": {
      "patch": {
        "description": "Supply body and the observed case version to prevent stale/concurrent edits. Only the original author or a primary owner/admin can edit the note. Previous bodies and their audit links remain in history. Note and case must match. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.noteUpdate",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "55555555-5555-4555-8555-555555555555",
            "in": "path",
            "name": "noteId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.noteUpdate",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                    "version": 3
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "body": {
                    "maxLength": 4000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "body",
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "audit": [
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.645Z",
                          "id": "00000000-0000-4000-8000-000000000012",
                          "kind": "investigation.case.opened",
                          "payload": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "title": "Example delivery review",
                            "typology": null
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.648Z",
                          "id": "00000000-0000-4000-8000-000000000013",
                          "kind": "investigation.flag.seeded",
                          "payload": {
                            "count": 2,
                            "signalKeys": [
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "added-after-lock:wi-00000000-0000-4000-8000-000000000011"
                            ]
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.780Z",
                          "id": "00000000-0000-4000-8000-000000000014",
                          "kind": "investigation.case.updated",
                          "payload": {
                            "after": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example evidence review"
                            },
                            "before": {
                              "graphState": {
                                "overlay": "all",
                                "panelOpen": true,
                                "positions": {},
                                "selected": null
                              },
                              "status": "Investigating",
                              "subtitle": "Establish the chain of evidence",
                              "title": "Example delivery review"
                            }
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.797Z",
                          "id": "00000000-0000-4000-8000-000000000015",
                          "kind": "investigation.note.added",
                          "payload": {
                            "after": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555",
                            "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        },
                        {
                          "actorName": "Example owner",
                          "actorUserId": "00000000-0000-4000-8000-000000000008",
                          "createdAt": "2026-10-01T07:59:39.814Z",
                          "id": "00000000-0000-4000-8000-000000000017",
                          "kind": "investigation.note.edited",
                          "payload": {
                            "after": {
                              "body": "Correction: retain the evidence link and state the remaining uncertainty."
                            },
                            "before": {
                              "body": "Delivery evidence supports this observation; inference remains separate."
                            },
                            "noteId": "55555555-5555-4555-8555-555555555555"
                          },
                          "subjectId": "33333333-3333-4333-8333-333333333333",
                          "subjectKind": "investigation_case"
                        }
                      ],
                      "canManage": true,
                      "case": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "closedAt": null,
                        "confidence": 25,
                        "createdAt": "2026-10-01T07:59:39.642Z",
                        "flagCount": 2,
                        "graphState": {
                          "overlay": "all",
                          "panelOpen": true,
                          "positions": {},
                          "selected": null
                        },
                        "id": "33333333-3333-4333-8333-333333333333",
                        "ownerName": "Example owner",
                        "ownerUserId": "00000000-0000-4000-8000-000000000008",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "status": "Investigating",
                        "subtitle": "Establish the chain of evidence",
                        "timeZone": "UTC",
                        "title": "Example evidence review",
                        "typology": null,
                        "unresolvedFlagCount": 2,
                        "updatedAt": "2026-10-01T07:59:39.812Z",
                        "version": 4
                      },
                      "flags": [
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "44444444-4444-4444-8444-444444444444",
                          "impact": "$1,800",
                          "impactCents": 180000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000009"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                          "title": "Refunds fail for split tender added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        },
                        {
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                          "disposition": null,
                          "history": [],
                          "id": "00000000-0000-4000-8000-000000000010",
                          "impact": "$4,800",
                          "impactCents": 480000,
                          "nodeIds": [
                            "wi-00000000-0000-4000-8000-000000000011"
                          ],
                          "rationale": null,
                          "resolvedAt": null,
                          "severity": "amber",
                          "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                          "title": "Loyalty points at checkout added after lock",
                          "typology": "added-after-lock",
                          "version": 1
                        }
                      ],
                      "notes": [
                        {
                          "authorName": "Example owner",
                          "authorUserId": "00000000-0000-4000-8000-000000000008",
                          "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                          "caseId": "33333333-3333-4333-8333-333333333333",
                          "createdAt": "2026-10-01T07:59:39.794Z",
                          "editedAt": "2026-10-01T07:59:39.812Z",
                          "history": [
                            {
                              "at": "2026-10-01T07:59:39.812Z",
                              "body": "Delivery evidence supports this observation; inference remains separate.",
                              "editedByName": "Example owner",
                              "editedByUserId": "00000000-0000-4000-8000-000000000008",
                              "id": "00000000-0000-4000-8000-000000000016"
                            }
                          ],
                          "id": "55555555-5555-4555-8555-555555555555",
                          "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                        }
                      ],
                      "packages": []
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "audit": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "subjectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "subjectKind": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "subjectKind",
                          "subjectId",
                          "actorUserId",
                          "actorName",
                          "payload",
                          "createdAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "canManage": {
                      "type": "boolean"
                    },
                    "case": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidence": {
                          "maximum": 100,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "flagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "graphState": {
                          "additionalProperties": false,
                          "properties": {
                            "overlay": {
                              "default": "all",
                              "enum": [
                                "all",
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            "panelOpen": {
                              "default": false,
                              "type": "boolean"
                            },
                            "positions": {
                              "additionalProperties": {
                                "additionalProperties": false,
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "selected": {
                              "anyOf": [
                                {
                                  "maxLength": 900,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "selected",
                            "overlay",
                            "panelOpen",
                            "positions"
                          ],
                          "type": "object"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "ownerName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ownerUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "Open",
                            "Investigating",
                            "Evidence gathered",
                            "Disposition",
                            "Resolved",
                            "Filed"
                          ],
                          "type": "string"
                        },
                        "subtitle": {
                          "maxLength": 300,
                          "type": "string"
                        },
                        "timeZone": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "title": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        },
                        "typology": {
                          "anyOf": [
                            {
                              "enum": [
                                "expansion",
                                "acdrift",
                                "rework",
                                "untraced",
                                "cost"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unresolvedFlagCount": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "clientId",
                        "periodStart",
                        "periodEnd",
                        "timeZone",
                        "typology",
                        "title",
                        "subtitle",
                        "status",
                        "ownerUserId",
                        "ownerName",
                        "confidence",
                        "flagCount",
                        "unresolvedFlagCount",
                        "graphState",
                        "version",
                        "createdAt",
                        "updatedAt",
                        "closedAt"
                      ],
                      "type": "object"
                    },
                    "flags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "anyOf": [
                              {
                                "enum": [
                                  "inscope",
                                  "cr",
                                  "billable",
                                  "writeoff",
                                  "decision"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "actorName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "actorUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "auditEventId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "from": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "inscope",
                                        "cr",
                                        "billable",
                                        "writeoff",
                                        "decision"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "rationale": {
                                  "type": "string"
                                },
                                "to": {
                                  "enum": [
                                    "inscope",
                                    "cr",
                                    "billable",
                                    "writeoff",
                                    "decision"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "from",
                                "to",
                                "rationale",
                                "actorUserId",
                                "actorName",
                                "at",
                                "auditEventId"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "impact": {
                            "type": "string"
                          },
                          "impactCents": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nodeIds": {
                            "items": {
                              "maxLength": 900,
                              "minLength": 1,
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "rationale": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolvedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "severity": {
                            "enum": [
                              "amber",
                              "red"
                            ],
                            "type": "string"
                          },
                          "signalKey": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "title": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "typology": {
                            "enum": [
                              "added-after-lock",
                              "reopened-from",
                              "estimate-growth",
                              "meeting-overrun",
                              "untraced"
                            ],
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "signalKey",
                          "typology",
                          "severity",
                          "title",
                          "detail",
                          "impact",
                          "impactCents",
                          "nodeIds",
                          "disposition",
                          "rationale",
                          "resolvedAt",
                          "version",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "authorUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "body": {
                            "maxLength": 4000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "editedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "at": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                  "type": "string"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "editedByName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "editedByUserId": {
                                  "anyOf": [
                                    {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "body",
                                "editedByUserId",
                                "editedByName",
                                "at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "targetNodeId": {
                            "maxLength": 900,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "targetNodeId",
                          "body",
                          "authorUserId",
                          "authorName",
                          "createdAt",
                          "editedAt",
                          "history"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "packages": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attachedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "contentHash": {
                            "pattern": "^[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdByUserId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "memo",
                              "cr",
                              "qbr"
                            ],
                            "type": "string"
                          },
                          "reportId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportSnapshotId": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "case": {
                                "additionalProperties": false,
                                "properties": {
                                  "agencyName": {
                                    "type": "string"
                                  },
                                  "clientName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "confidence": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "periodEnd": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "periodStart": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "projectName": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "Open",
                                      "Investigating",
                                      "Evidence gathered",
                                      "Disposition",
                                      "Resolved",
                                      "Filed"
                                    ],
                                    "type": "string"
                                  },
                                  "subtitle": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "expansion",
                                          "acdrift",
                                          "rework",
                                          "untraced",
                                          "cost"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "subtitle",
                                  "status",
                                  "typology",
                                  "periodStart",
                                  "periodEnd",
                                  "periodLabel",
                                  "clientName",
                                  "projectName",
                                  "agencyName",
                                  "confidence"
                                ],
                                "type": "object"
                              },
                              "claims": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "text": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "nodeIds",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "custody": {
                                "additionalProperties": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "jira",
                                          "pr",
                                          "release",
                                          "meeting",
                                          "note"
                                        ],
                                        "type": "string"
                                      },
                                      "meta": {
                                        "type": "string"
                                      },
                                      "t": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "t",
                                      "meta"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "draft": {
                                "type": "boolean"
                              },
                              "engine": {
                                "enum": [
                                  "template",
                                  "claude"
                                ],
                                "type": "string"
                              },
                              "flags": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "disposition": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "inscope",
                                            "cr",
                                            "billable",
                                            "writeoff",
                                            "decision"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "dispositionLabel": {
                                      "type": "string"
                                    },
                                    "evidenceMissing": {
                                      "type": "boolean"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "impact": {
                                      "type": "string"
                                    },
                                    "impactCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "nodeIds": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "rationale": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "resolvedAt": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "severity": {
                                      "enum": [
                                        "amber",
                                        "red"
                                      ],
                                      "type": "string"
                                    },
                                    "signalKey": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "typology": {
                                      "enum": [
                                        "added-after-lock",
                                        "reopened-from",
                                        "estimate-growth",
                                        "meeting-overrun",
                                        "untraced"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "signalKey",
                                    "typology",
                                    "severity",
                                    "title",
                                    "detail",
                                    "impact",
                                    "impactCents",
                                    "nodeIds",
                                    "disposition",
                                    "dispositionLabel",
                                    "rationale",
                                    "resolvedAt",
                                    "evidenceMissing",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "generatedAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "notes": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "at": {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                      "type": "string"
                                    },
                                    "auditEventIds": {
                                      "items": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "authorName": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "body": {
                                      "type": "string"
                                    },
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "targetNodeId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "authorName",
                                    "at",
                                    "targetNodeId",
                                    "body",
                                    "auditEventIds"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "prose": {
                                "additionalProperties": false,
                                "properties": {
                                  "sections": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "body": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "heading": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "heading",
                                        "body"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "summary": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "title",
                                  "summary",
                                  "sections"
                                ],
                                "type": "object"
                              },
                              "provenance": {
                                "additionalProperties": false,
                                "properties": {
                                  "graphBuild": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphHash": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "profile": {
                                            "type": "string"
                                          },
                                          "rulesVersion": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "graphHash",
                                          "rulesVersion",
                                          "profile"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lock": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "approvalRef": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "authority": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "effectiveAt": {
                                            "format": "date-time",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                            "type": "string"
                                          },
                                          "lockedOn": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "lockId": {
                                            "anyOf": [
                                              {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "memberCount": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 0,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provenance": {
                                            "enum": [
                                              "explicit",
                                              "register_scope_lock_date",
                                              "engagement_starts_on"
                                            ],
                                            "type": "string"
                                          },
                                          "reconstructed": {
                                            "type": "boolean"
                                          },
                                          "resolverVersion": {
                                            "type": "string"
                                          },
                                          "timeZone": {
                                            "type": "string"
                                          },
                                          "version": {
                                            "anyOf": [
                                              {
                                                "maximum": 9007199254740991,
                                                "minimum": 1,
                                                "type": "integer"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lockId",
                                          "version",
                                          "lockedOn",
                                          "effectiveAt",
                                          "timeZone",
                                          "provenance",
                                          "reconstructed",
                                          "authority",
                                          "approvalRef",
                                          "memberCount",
                                          "resolverVersion"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "lock",
                                  "graphBuild"
                                ],
                                "type": "object"
                              },
                              "version": {
                                "const": 1,
                                "type": "number"
                              },
                              "watermark": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "version",
                              "kind",
                              "draft",
                              "watermark",
                              "case",
                              "flags",
                              "notes",
                              "custody",
                              "claims",
                              "prose",
                              "engine",
                              "generatedAt"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "final"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "caseId",
                          "kind",
                          "status",
                          "snapshot",
                          "contentHash",
                          "reportId",
                          "reportSnapshotId",
                          "createdByUserId",
                          "createdByName",
                          "createdAt",
                          "attachedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "case",
                    "flags",
                    "notes",
                    "packages",
                    "audit",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Correct a note with retained history",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.note",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}/packages": {
      "post": {
        "description": "Create a memo, cr or qbr from frozen facts/custody/claims and baseline/graph provenance. A final package requires every flag dispositioned and files the case; a draft is watermarked and cannot attach. Existing opt-in/provider/budget guards and slot-only prose rules apply; unavailable/refused AI falls back to template with truthful engine. Durable operation IDs deduplicate package persistence and provider metering. An uncertain outcome is reconciled by stored package ID; it is never blindly generated again. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.packageCreate",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.packageCreate",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "draft": false,
                    "kind": "memo"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "draft": {
                    "default": false,
                    "type": "boolean"
                  },
                  "kind": {
                    "enum": [
                      "memo",
                      "cr",
                      "qbr"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "kind"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "gate": {
                        "ok": true,
                        "total": 2,
                        "unresolved": 0
                      },
                      "package": {
                        "attachedAt": null,
                        "caseId": "33333333-3333-4333-8333-333333333333",
                        "contentHash": "3de1f3ff28b41bca9750f4ecc4583b697a3ce58bd5785ea06a00c9c7b3719bf4",
                        "createdAt": "2026-10-01T07:59:40.043Z",
                        "createdByName": "Example owner",
                        "createdByUserId": "00000000-0000-4000-8000-000000000008",
                        "id": "66666666-6666-4666-8666-666666666666",
                        "kind": "memo",
                        "reportId": null,
                        "reportSnapshotId": null,
                        "snapshot": {
                          "case": {
                            "agencyName": "Synthetic investigations",
                            "clientName": "example Retail",
                            "confidence": 25,
                            "id": "33333333-3333-4333-8333-333333333333",
                            "periodEnd": "2026-03-31",
                            "periodLabel": "Q1 2026",
                            "periodStart": "2026-01-01",
                            "projectName": "example Checkout Replatform",
                            "status": "Filed",
                            "subtitle": "Establish the chain of evidence",
                            "title": "Example evidence review",
                            "typology": null
                          },
                          "claims": [
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000019"
                              ],
                              "id": "claim:44444444-4444-4444-8444-444444444444",
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000009"
                              ],
                              "text": "Refunds fail for split tender added after lock — In scope: Reviewed the synthetic delivery evidence ($1,800)"
                            },
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000020"
                              ],
                              "id": "claim:00000000-0000-4000-8000-000000000010",
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000011"
                              ],
                              "text": "Loyalty points at checkout added after lock — In scope: Reviewed the synthetic delivery evidence ($4,800)"
                            }
                          ],
                          "custody": {
                            "wi-00000000-0000-4000-8000-000000000009": [
                              {
                                "id": "EXAMPLE-42",
                                "kind": "jira",
                                "meta": "Added Feb 20 · post-lock",
                                "t": "Refunds fail for split tender"
                              },
                              {
                                "id": "MR !7",
                                "kind": "pr",
                                "meta": "Merged Mar 02",
                                "t": "Split tender refund path"
                              }
                            ],
                            "wi-00000000-0000-4000-8000-000000000011": [
                              {
                                "id": "EXAMPLE-77",
                                "kind": "jira",
                                "meta": "Added Mar 05 · post-lock",
                                "t": "Loyalty points at checkout"
                              }
                            ]
                          },
                          "draft": false,
                          "engine": "template",
                          "flags": [
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000019"
                              ],
                              "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                              "disposition": "inscope",
                              "dispositionLabel": "In scope",
                              "evidenceMissing": false,
                              "id": "44444444-4444-4444-8444-444444444444",
                              "impact": "$1,800",
                              "impactCents": 180000,
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000009"
                              ],
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "resolvedAt": "2026-10-01T07:59:39.849Z",
                              "severity": "amber",
                              "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "title": "Refunds fail for split tender added after lock",
                              "typology": "added-after-lock"
                            },
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000020"
                              ],
                              "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                              "disposition": "inscope",
                              "dispositionLabel": "In scope",
                              "evidenceMissing": false,
                              "id": "00000000-0000-4000-8000-000000000010",
                              "impact": "$4,800",
                              "impactCents": 480000,
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000011"
                              ],
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "resolvedAt": "2026-10-01T07:59:39.890Z",
                              "severity": "amber",
                              "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                              "title": "Loyalty points at checkout added after lock",
                              "typology": "added-after-lock"
                            }
                          ],
                          "generatedAt": "2026-10-01T07:59:40.042Z",
                          "kind": "memo",
                          "notes": [
                            {
                              "at": "2026-10-01T07:59:39.794Z",
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000015",
                                "00000000-0000-4000-8000-000000000017"
                              ],
                              "authorName": "Example owner",
                              "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                              "id": "55555555-5555-4555-8555-555555555555",
                              "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                            }
                          ],
                          "prose": {
                            "sections": [
                              {
                                "body": "Evidence is traced node by node from the scope locked on 2026-01-01 through 1 release; case confidence stands at 25%.",
                                "heading": "What moved after the lock"
                              },
                              {
                                "body": "Confirmed in scope and absorbed: $6,600.",
                                "heading": "Dispositions"
                              },
                              {
                                "body": "Each claim links back to the source records and to the audit events that produced it. The subject throughout is the delivery and the scope, never an individual.",
                                "heading": "How to read this memo"
                              }
                            ],
                            "summary": "$6,600 of delivery investment on example Checkout Replatform for example Retail during Q1 2026 is accounted for line by line below. Every one of the 2 flags carries a disposition with a rationale.",
                            "title": "Invoice-defense memo · example Checkout Replatform · Q1 2026"
                          },
                          "provenance": {
                            "graphBuild": null,
                            "lock": {
                              "approvalRef": null,
                              "authority": null,
                              "effectiveAt": "2026-01-02T00:00:00.000Z",
                              "lockedOn": "2026-01-01",
                              "lockId": null,
                              "memberCount": null,
                              "provenance": "engagement_starts_on",
                              "reconstructed": true,
                              "resolverVersion": "lock-resolver@1",
                              "timeZone": "UTC",
                              "version": null
                            }
                          },
                          "version": 1,
                          "watermark": null
                        },
                        "status": "final"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "gate": {
                      "additionalProperties": false,
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "total": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "unresolved": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "ok",
                        "unresolved",
                        "total"
                      ],
                      "type": "object"
                    },
                    "package": {
                      "additionalProperties": false,
                      "properties": {
                        "attachedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "caseId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "contentHash": {
                          "pattern": "^[0-9a-f]{64}$",
                          "type": "string"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "createdByName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "memo",
                            "cr",
                            "qbr"
                          ],
                          "type": "string"
                        },
                        "reportId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reportSnapshotId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "snapshot": {
                          "additionalProperties": false,
                          "properties": {
                            "case": {
                              "additionalProperties": false,
                              "properties": {
                                "agencyName": {
                                  "type": "string"
                                },
                                "clientName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "confidence": {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "periodLabel": {
                                  "type": "string"
                                },
                                "periodStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "Open",
                                    "Investigating",
                                    "Evidence gathered",
                                    "Disposition",
                                    "Resolved",
                                    "Filed"
                                  ],
                                  "type": "string"
                                },
                                "subtitle": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "typology": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "expansion",
                                        "acdrift",
                                        "rework",
                                        "untraced",
                                        "cost"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "subtitle",
                                "status",
                                "typology",
                                "periodStart",
                                "periodEnd",
                                "periodLabel",
                                "clientName",
                                "projectName",
                                "agencyName",
                                "confidence"
                              ],
                              "type": "object"
                            },
                            "claims": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "nodeIds": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "text": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "nodeIds",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "custody": {
                              "additionalProperties": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "enum": [
                                        "jira",
                                        "pr",
                                        "release",
                                        "meeting",
                                        "note"
                                      ],
                                      "type": "string"
                                    },
                                    "meta": {
                                      "type": "string"
                                    },
                                    "t": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id",
                                    "t",
                                    "meta"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "draft": {
                              "type": "boolean"
                            },
                            "engine": {
                              "enum": [
                                "template",
                                "claude"
                              ],
                              "type": "string"
                            },
                            "flags": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "detail": {
                                    "type": "string"
                                  },
                                  "disposition": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "inscope",
                                          "cr",
                                          "billable",
                                          "writeoff",
                                          "decision"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "dispositionLabel": {
                                    "type": "string"
                                  },
                                  "evidenceMissing": {
                                    "type": "boolean"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "impact": {
                                    "type": "string"
                                  },
                                  "impactCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "nodeIds": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "rationale": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "resolvedAt": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "severity": {
                                    "enum": [
                                      "amber",
                                      "red"
                                    ],
                                    "type": "string"
                                  },
                                  "signalKey": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "enum": [
                                      "added-after-lock",
                                      "reopened-from",
                                      "estimate-growth",
                                      "meeting-overrun",
                                      "untraced"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "signalKey",
                                  "typology",
                                  "severity",
                                  "title",
                                  "detail",
                                  "impact",
                                  "impactCents",
                                  "nodeIds",
                                  "disposition",
                                  "dispositionLabel",
                                  "rationale",
                                  "resolvedAt",
                                  "evidenceMissing",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "generatedAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "memo",
                                "cr",
                                "qbr"
                              ],
                              "type": "string"
                            },
                            "notes": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "at": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "authorName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "body": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "targetNodeId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "authorName",
                                  "at",
                                  "targetNodeId",
                                  "body",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "prose": {
                              "additionalProperties": false,
                              "properties": {
                                "sections": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "body": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "heading": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "heading",
                                      "body"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "summary": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "title": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "title",
                                "summary",
                                "sections"
                              ],
                              "type": "object"
                            },
                            "provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "graphBuild": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "graphHash": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "profile": {
                                          "type": "string"
                                        },
                                        "rulesVersion": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "graphHash",
                                        "rulesVersion",
                                        "profile"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lock": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "approvalRef": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "authority": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "effectiveAt": {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                          "type": "string"
                                        },
                                        "lockedOn": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "lockId": {
                                          "anyOf": [
                                            {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "memberCount": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "provenance": {
                                          "enum": [
                                            "explicit",
                                            "register_scope_lock_date",
                                            "engagement_starts_on"
                                          ],
                                          "type": "string"
                                        },
                                        "reconstructed": {
                                          "type": "boolean"
                                        },
                                        "resolverVersion": {
                                          "type": "string"
                                        },
                                        "timeZone": {
                                          "type": "string"
                                        },
                                        "version": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "lockId",
                                        "version",
                                        "lockedOn",
                                        "effectiveAt",
                                        "timeZone",
                                        "provenance",
                                        "reconstructed",
                                        "authority",
                                        "approvalRef",
                                        "memberCount",
                                        "resolverVersion"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "lock",
                                "graphBuild"
                              ],
                              "type": "object"
                            },
                            "version": {
                              "const": 1,
                              "type": "number"
                            },
                            "watermark": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "version",
                            "kind",
                            "draft",
                            "watermark",
                            "case",
                            "flags",
                            "notes",
                            "custody",
                            "claims",
                            "prose",
                            "engine",
                            "generatedAt"
                          ],
                          "type": "object"
                        },
                        "status": {
                          "enum": [
                            "draft",
                            "final"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "caseId",
                        "kind",
                        "status",
                        "snapshot",
                        "contentHash",
                        "reportId",
                        "reportSnapshotId",
                        "createdByUserId",
                        "createdByName",
                        "createdAt",
                        "attachedAt"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "package",
                    "gate"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Freeze an evidence package",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "external",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/investigations/{caseId}/packages/{packageId}/attach": {
      "post": {
        "description": "Requires both investigations.manage and reports.create with current project access, including on replay. Final package, source case and destination report must share tenant/project. Attach creates a new immutable report snapshot with frozen package evidence, retaining previous snapshots. Draft/already attached/stale destinations conflict. No email, delivery or public sharing is performed. Explicit scope plus current creator actions, tenant identity and RLS apply. Identical successful retries preserve the original response without repeated rows/history/audit; changed input conflicts. Current authorization applies again on replay. Case deletion and new AI grouping/interpretation are unavailable.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.\n\nCase/flag changes require the observed version; API note edits additionally carry the observed case version.\n\nNarrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.\n\nUncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request.",
        "operationId": "investigations.packageAttach",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "caseId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "66666666-6666-4666-8666-666666666666",
            "in": "path",
            "name": "packageId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-investigations.packageAttach",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "reportId": "77777777-7777-4777-8777-777777777777"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "reportId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  }
                },
                "required": [
                  "reportId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL investigation workflow",
                    "value": {
                      "package": {
                        "attachedAt": "2026-10-01T07:59:40.228Z",
                        "caseId": "33333333-3333-4333-8333-333333333333",
                        "contentHash": "3de1f3ff28b41bca9750f4ecc4583b697a3ce58bd5785ea06a00c9c7b3719bf4",
                        "createdAt": "2026-10-01T07:59:40.043Z",
                        "createdByName": "Example owner",
                        "createdByUserId": "00000000-0000-4000-8000-000000000008",
                        "id": "66666666-6666-4666-8666-666666666666",
                        "kind": "memo",
                        "reportId": "77777777-7777-4777-8777-777777777777",
                        "reportSnapshotId": "00000000-0000-4000-8000-000000000021",
                        "snapshot": {
                          "case": {
                            "agencyName": "Synthetic investigations",
                            "clientName": "example Retail",
                            "confidence": 25,
                            "id": "33333333-3333-4333-8333-333333333333",
                            "periodEnd": "2026-03-31",
                            "periodLabel": "Q1 2026",
                            "periodStart": "2026-01-01",
                            "projectName": "example Checkout Replatform",
                            "status": "Filed",
                            "subtitle": "Establish the chain of evidence",
                            "title": "Example evidence review",
                            "typology": null
                          },
                          "claims": [
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000019"
                              ],
                              "id": "claim:44444444-4444-4444-8444-444444444444",
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000009"
                              ],
                              "text": "Refunds fail for split tender added after lock — In scope: Reviewed the synthetic delivery evidence ($1,800)"
                            },
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000020"
                              ],
                              "id": "claim:00000000-0000-4000-8000-000000000010",
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000011"
                              ],
                              "text": "Loyalty points at checkout added after lock — In scope: Reviewed the synthetic delivery evidence ($4,800)"
                            }
                          ],
                          "custody": {
                            "wi-00000000-0000-4000-8000-000000000009": [
                              {
                                "id": "EXAMPLE-42",
                                "kind": "jira",
                                "meta": "Added Feb 20 · post-lock",
                                "t": "Refunds fail for split tender"
                              },
                              {
                                "id": "MR !7",
                                "kind": "pr",
                                "meta": "Merged Mar 02",
                                "t": "Split tender refund path"
                              }
                            ],
                            "wi-00000000-0000-4000-8000-000000000011": [
                              {
                                "id": "EXAMPLE-77",
                                "kind": "jira",
                                "meta": "Added Mar 05 · post-lock",
                                "t": "Loyalty points at checkout"
                              }
                            ]
                          },
                          "draft": false,
                          "engine": "template",
                          "flags": [
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000019"
                              ],
                              "detail": "EXAMPLE-42 entered the cycle on Feb 20, after the Jan 01 baseline.",
                              "disposition": "inscope",
                              "dispositionLabel": "In scope",
                              "evidenceMissing": false,
                              "id": "44444444-4444-4444-8444-444444444444",
                              "impact": "$1,800",
                              "impactCents": 180000,
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000009"
                              ],
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "resolvedAt": "2026-10-01T07:59:39.849Z",
                              "severity": "amber",
                              "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000009",
                              "title": "Refunds fail for split tender added after lock",
                              "typology": "added-after-lock"
                            },
                            {
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000020"
                              ],
                              "detail": "EXAMPLE-77 entered the cycle on Mar 05, after the Jan 01 baseline.",
                              "disposition": "inscope",
                              "dispositionLabel": "In scope",
                              "evidenceMissing": false,
                              "id": "00000000-0000-4000-8000-000000000010",
                              "impact": "$4,800",
                              "impactCents": 480000,
                              "nodeIds": [
                                "wi-00000000-0000-4000-8000-000000000011"
                              ],
                              "rationale": "Reviewed the synthetic delivery evidence",
                              "resolvedAt": "2026-10-01T07:59:39.890Z",
                              "severity": "amber",
                              "signalKey": "added-after-lock:wi-00000000-0000-4000-8000-000000000011",
                              "title": "Loyalty points at checkout added after lock",
                              "typology": "added-after-lock"
                            }
                          ],
                          "generatedAt": "2026-10-01T07:59:40.042Z",
                          "kind": "memo",
                          "notes": [
                            {
                              "at": "2026-10-01T07:59:39.794Z",
                              "auditEventIds": [
                                "00000000-0000-4000-8000-000000000015",
                                "00000000-0000-4000-8000-000000000017"
                              ],
                              "authorName": "Example owner",
                              "body": "Correction: retain the evidence link and state the remaining uncertainty.",
                              "id": "55555555-5555-4555-8555-555555555555",
                              "targetNodeId": "wi-00000000-0000-4000-8000-000000000009"
                            }
                          ],
                          "prose": {
                            "sections": [
                              {
                                "body": "Evidence is traced node by node from the scope locked on 2026-01-01 through 1 release; case confidence stands at 25%.",
                                "heading": "What moved after the lock"
                              },
                              {
                                "body": "Confirmed in scope and absorbed: $6,600.",
                                "heading": "Dispositions"
                              },
                              {
                                "body": "Each claim links back to the source records and to the audit events that produced it. The subject throughout is the delivery and the scope, never an individual.",
                                "heading": "How to read this memo"
                              }
                            ],
                            "summary": "$6,600 of delivery investment on example Checkout Replatform for example Retail during Q1 2026 is accounted for line by line below. Every one of the 2 flags carries a disposition with a rationale.",
                            "title": "Invoice-defense memo · example Checkout Replatform · Q1 2026"
                          },
                          "provenance": {
                            "graphBuild": null,
                            "lock": {
                              "approvalRef": null,
                              "authority": null,
                              "effectiveAt": "2026-01-02T00:00:00.000Z",
                              "lockedOn": "2026-01-01",
                              "lockId": null,
                              "memberCount": null,
                              "provenance": "engagement_starts_on",
                              "reconstructed": true,
                              "resolverVersion": "lock-resolver@1",
                              "timeZone": "UTC",
                              "version": null
                            }
                          },
                          "version": 1,
                          "watermark": null
                        },
                        "status": "final"
                      },
                      "reportId": "77777777-7777-4777-8777-777777777777",
                      "reportSnapshotId": "00000000-0000-4000-8000-000000000021"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "package": {
                      "additionalProperties": false,
                      "properties": {
                        "attachedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "caseId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "contentHash": {
                          "pattern": "^[0-9a-f]{64}$",
                          "type": "string"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "createdByName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdByUserId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "memo",
                            "cr",
                            "qbr"
                          ],
                          "type": "string"
                        },
                        "reportId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reportSnapshotId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "snapshot": {
                          "additionalProperties": false,
                          "properties": {
                            "case": {
                              "additionalProperties": false,
                              "properties": {
                                "agencyName": {
                                  "type": "string"
                                },
                                "clientName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "confidence": {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "id": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "periodLabel": {
                                  "type": "string"
                                },
                                "periodStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "Open",
                                    "Investigating",
                                    "Evidence gathered",
                                    "Disposition",
                                    "Resolved",
                                    "Filed"
                                  ],
                                  "type": "string"
                                },
                                "subtitle": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "typology": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "expansion",
                                        "acdrift",
                                        "rework",
                                        "untraced",
                                        "cost"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "subtitle",
                                "status",
                                "typology",
                                "periodStart",
                                "periodEnd",
                                "periodLabel",
                                "clientName",
                                "projectName",
                                "agencyName",
                                "confidence"
                              ],
                              "type": "object"
                            },
                            "claims": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "nodeIds": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "text": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "nodeIds",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "custody": {
                              "additionalProperties": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "enum": [
                                        "jira",
                                        "pr",
                                        "release",
                                        "meeting",
                                        "note"
                                      ],
                                      "type": "string"
                                    },
                                    "meta": {
                                      "type": "string"
                                    },
                                    "t": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id",
                                    "t",
                                    "meta"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "draft": {
                              "type": "boolean"
                            },
                            "engine": {
                              "enum": [
                                "template",
                                "claude"
                              ],
                              "type": "string"
                            },
                            "flags": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "detail": {
                                    "type": "string"
                                  },
                                  "disposition": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "inscope",
                                          "cr",
                                          "billable",
                                          "writeoff",
                                          "decision"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "dispositionLabel": {
                                    "type": "string"
                                  },
                                  "evidenceMissing": {
                                    "type": "boolean"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "impact": {
                                    "type": "string"
                                  },
                                  "impactCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "nodeIds": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "rationale": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "resolvedAt": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "severity": {
                                    "enum": [
                                      "amber",
                                      "red"
                                    ],
                                    "type": "string"
                                  },
                                  "signalKey": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "typology": {
                                    "enum": [
                                      "added-after-lock",
                                      "reopened-from",
                                      "estimate-growth",
                                      "meeting-overrun",
                                      "untraced"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "signalKey",
                                  "typology",
                                  "severity",
                                  "title",
                                  "detail",
                                  "impact",
                                  "impactCents",
                                  "nodeIds",
                                  "disposition",
                                  "dispositionLabel",
                                  "rationale",
                                  "resolvedAt",
                                  "evidenceMissing",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "generatedAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "kind": {
                              "enum": [
                                "memo",
                                "cr",
                                "qbr"
                              ],
                              "type": "string"
                            },
                            "notes": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "at": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "auditEventIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "authorName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "body": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "targetNodeId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "authorName",
                                  "at",
                                  "targetNodeId",
                                  "body",
                                  "auditEventIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "prose": {
                              "additionalProperties": false,
                              "properties": {
                                "sections": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "body": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "heading": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "heading",
                                      "body"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "summary": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "title": {
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "title",
                                "summary",
                                "sections"
                              ],
                              "type": "object"
                            },
                            "provenance": {
                              "additionalProperties": false,
                              "properties": {
                                "graphBuild": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "graphHash": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "profile": {
                                          "type": "string"
                                        },
                                        "rulesVersion": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "graphHash",
                                        "rulesVersion",
                                        "profile"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lock": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "approvalRef": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "authority": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "effectiveAt": {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                          "type": "string"
                                        },
                                        "lockedOn": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "lockId": {
                                          "anyOf": [
                                            {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "memberCount": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "provenance": {
                                          "enum": [
                                            "explicit",
                                            "register_scope_lock_date",
                                            "engagement_starts_on"
                                          ],
                                          "type": "string"
                                        },
                                        "reconstructed": {
                                          "type": "boolean"
                                        },
                                        "resolverVersion": {
                                          "type": "string"
                                        },
                                        "timeZone": {
                                          "type": "string"
                                        },
                                        "version": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "lockId",
                                        "version",
                                        "lockedOn",
                                        "effectiveAt",
                                        "timeZone",
                                        "provenance",
                                        "reconstructed",
                                        "authority",
                                        "approvalRef",
                                        "memberCount",
                                        "resolverVersion"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "lock",
                                "graphBuild"
                              ],
                              "type": "object"
                            },
                            "version": {
                              "const": 1,
                              "type": "number"
                            },
                            "watermark": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "version",
                            "kind",
                            "draft",
                            "watermark",
                            "case",
                            "flags",
                            "notes",
                            "custody",
                            "claims",
                            "prose",
                            "engine",
                            "generatedAt"
                          ],
                          "type": "object"
                        },
                        "status": {
                          "enum": [
                            "draft",
                            "final"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "caseId",
                        "kind",
                        "status",
                        "snapshot",
                        "contentHash",
                        "reportId",
                        "reportSnapshotId",
                        "createdByUserId",
                        "createdByName",
                        "createdAt",
                        "attachedAt"
                      ],
                      "type": "object"
                    },
                    "reportId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "reportSnapshotId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "package",
                    "reportId",
                    "reportSnapshotId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Attach a final package to a report snapshot",
        "tags": [
          "investigations"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "investigations.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Cases, flags, notes, packages and attached reports belong to the same authorized tenant/project and their declared parent.",
            "Case/flag changes require the observed version; API note edits additionally carry the observed case version.",
            "Narrative is inference around sourced facts; numerical facts are deterministic and package custody/provenance is frozen.",
            "Uncertain external outcomes retain a durable operation for reconciliation; use the original idempotency header, never issue an automatic new request."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "investigations:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/invoice-defense": {
      "get": {
        "description": "Read deterministic delivery facts and reconcile the latest invoice overlapping a required project date range. Optional question selects a supported explanation pack. Missing invoices or prerequisites remain null. The public GET always uses facts mode and never invokes a narrative model or charges an AI request. Invoice amounts are minor currency units. No invoice write or pagination is provided. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart must not follow end; tz must be a recognized IANA time zone and defaults to UTC.\n\nPublic reads always return deterministic facts without narrative model execution.",
        "operationId": "invoiceDefense.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-07",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "question",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          },
          {
            "example": "facts",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "enum": [
                "facts"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "facts": {
                        "actions": [
                          {
                            "action": "Review added items with the client and formalize the next-cycle scope.",
                            "n": 1,
                            "tag": "Margin",
                            "title": "Convert scope expansion into a change request",
                            "tone": "amber",
                            "why": "No scope baseline is recorded for this period yet."
                          },
                          {
                            "action": "Create a dedicated discovery / clarification budget bucket.",
                            "n": 2,
                            "tag": "Process",
                            "title": "Separate discovery from implementation budget",
                            "tone": "blue",
                            "why": "Clarification meetings are not yet attributed to this project."
                          },
                          {
                            "action": "Require ticket IDs in branch names and PR titles.",
                            "n": 3,
                            "tag": "Data",
                            "title": "Improve ticket-to-PR traceability",
                            "tone": "neutral",
                            "why": "No merged PRs were recorded in this period."
                          },
                          {
                            "action": "Add an AI-assisted field or label to relevant work items.",
                            "n": 4,
                            "tag": "AI",
                            "title": "Track AI-assisted work explicitly",
                            "tone": "purple",
                            "why": "AI-assisted delivery cannot be measured until assisted work is tagged."
                          },
                          {
                            "action": "Use the executive summary and scope expansion sections in the next QBR or invoice discussion.",
                            "n": 5,
                            "tag": "Client",
                            "title": "Use this report in the next client review",
                            "tone": "green",
                            "why": "The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions."
                          }
                        ],
                        "ai": null,
                        "aiInsufficientSample": null,
                        "assumptions": [
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "cost-basis",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Cost estimate basis",
                            "unitOrMethod": "person_then_role",
                            "value": "No rate card",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "scope-baseline",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Scope baseline",
                            "unitOrMethod": "engagement_start",
                            "value": "0 work items",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "meeting-attribution",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Meeting attribution",
                            "unitOrMethod": "project_tagged",
                            "value": "No meetings synced",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "ai-attribution",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "AI attribution",
                            "unitOrMethod": "self_reported",
                            "value": "Self-reported labels and trailers",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "reporting-period",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Reporting period",
                            "unitOrMethod": "active_range",
                            "value": "Oct 1, 2026",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-10-01",
                            "effectiveTo": null,
                            "id": "work-cost-allocation",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Work-item cost allocation",
                            "unitOrMethod": "not_allocated",
                            "value": "Team estimate only",
                            "versionId": null
                          }
                        ],
                        "confidence": {
                          "hints": [
                            "Include ticket IDs in pull-request titles or branch names.",
                            "Map tracker work items to the client and project.",
                            "Tag calendar events with the client or project.",
                            "Add person-level rates for worked hours; role rates remain partial.",
                            "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                            "Connect deployment evidence to completed work items.",
                            "Connect a source or import evidence consistently to reduce manual-only coverage.",
                            "Reconnect or sync sources so their latest successful data is current.",
                            "Confirm or rectify the reporting assumptions used for this period."
                          ],
                          "label": "Low",
                          "score": 0,
                          "signals": [
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Merged code changes linked to normalized work items in the report period."
                              },
                              "id": "prs_linked",
                              "label": "PRs linked to tickets",
                              "note": "No merged PRs yet",
                              "pct": null,
                              "weight": 16
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Workspace work items in the report period with a normalized project mapping."
                              },
                              "id": "items_mapped",
                              "label": "Tickets mapped to client / project",
                              "note": "Workspace mapping coverage",
                              "pct": null,
                              "weight": 14
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": null,
                                "numerator": null,
                                "query": "An active Google Calendar connection is required before calendar tagging is measured."
                              },
                              "id": "meetings_tagged",
                              "label": "Meetings tagged to client / project",
                              "note": "No active calendar source",
                              "pct": null,
                              "weight": 12
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                              },
                              "id": "rate_card",
                              "label": "Rate card precision",
                              "note": "No labour hours in this period",
                              "pct": null,
                              "weight": 14
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": null,
                                "numerator": null,
                                "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                              },
                              "id": "ai_tagging",
                              "label": "AI-assisted work tagging",
                              "note": "Not tagged",
                              "pct": null,
                              "weight": 12
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                              },
                              "id": "release_evidence",
                              "label": "Release / deployment evidence",
                              "note": "Completed work with linked release evidence",
                              "pct": null,
                              "weight": 10
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": null,
                                "numerator": null,
                                "query": "Synced rather than manual or CSV evidence rows in the report context."
                              },
                              "id": "manual_entry_share",
                              "label": "Synced evidence share",
                              "note": "Synced evidence coverage",
                              "pct": null,
                              "weight": 8
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Latest successful sync per active connection, measured against the report period end."
                              },
                              "id": "freshness",
                              "label": "Source freshness",
                              "note": "No active sources",
                              "pct": null,
                              "weight": 8
                            },
                            {
                              "contribution": 0,
                              "evidence": {
                                "denominator": 6,
                                "numerator": 0,
                                "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                              },
                              "id": "assumptions",
                              "label": "Confirmed reporting assumptions",
                              "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                              "pct": 0,
                              "weight": 6
                            }
                          ]
                        },
                        "coordination": {
                          "blendedHourlyRateCents": null,
                          "costCents": null,
                          "declined": 0,
                          "hours": 0,
                          "meetings": 0,
                          "taggingPct": null
                        },
                        "currency": null,
                        "delivery": {
                          "completedItems": 0,
                          "mergedChanges": 0,
                          "milestones": 0,
                          "objectivesCompleted": 0,
                          "objectivesTotal": 0,
                          "prsLinkedPct": null,
                          "releaseRows": [],
                          "releases": 0,
                          "rows": []
                        },
                        "evidencePackages": [],
                        "investment": {
                          "cloudCents": 0,
                          "coordinationCents": null,
                          "coordinationPct": null,
                          "costEvidence": {
                            "cloudLines": 0,
                            "linkedTimeEntries": 0,
                            "timeEntries": 0
                          },
                          "currencyConflict": false,
                          "estimated": false,
                          "estimatedCloudCents": 0,
                          "invoicedCents": null,
                          "labourCategories": [],
                          "labourCents": 0,
                          "labourHours": 0,
                          "reworkCents": null,
                          "reworkPct": null,
                          "roleBandHours": 0,
                          "scopeCents": null,
                          "scopePct": null,
                          "totalCents": null,
                          "unpricedHours": 0
                        },
                        "manualEntrySharePct": null,
                        "periodEnd": "2026-10-01",
                        "periodStart": "2026-10-01",
                        "scope": null,
                        "sources": [
                          {
                            "label": "Contracts",
                            "source": "commercial",
                            "state": "not_connected"
                          },
                          {
                            "label": "Tracker",
                            "source": "tracker",
                            "state": "not_connected"
                          },
                          {
                            "label": "Code",
                            "source": "code",
                            "state": "not_connected"
                          },
                          {
                            "label": "Releases",
                            "source": "release",
                            "state": "not_connected"
                          },
                          {
                            "label": "Calendar",
                            "source": "calendar",
                            "state": "not_connected"
                          }
                        ]
                      },
                      "invoice": null,
                      "pack": null,
                      "reconciliation": null
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "facts": {
                      "additionalProperties": false,
                      "properties": {
                        "actions": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "action": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "n": {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              "tag": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tone": {
                                "enum": [
                                  "amber",
                                  "blue",
                                  "neutral",
                                  "purple",
                                  "green"
                                ],
                                "type": "string"
                              },
                              "why": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "n",
                              "tag",
                              "tone",
                              "title",
                              "why",
                              "action"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "ai": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "assistedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "assistedPct": {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "baselineChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "implementationHoursSaved": {
                                  "type": "number"
                                },
                                "netHours": {
                                  "type": "number"
                                },
                                "reviewOverheadHours": {
                                  "type": "number"
                                },
                                "reviewOverheadPct": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "assistedChanges",
                                "baselineChanges",
                                "assistedPct",
                                "implementationHoursSaved",
                                "reviewOverheadHours",
                                "netHours",
                                "reviewOverheadPct"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "aiInsufficientSample": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "assistedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "baselineChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "mergedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "taggedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "assistedChanges",
                                "baselineChanges",
                                "mergedChanges",
                                "taggedChanges"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "assumptions": {
                          "default": [],
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "effectiveFrom": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "effectiveTo": {
                                "anyOf": [
                                  {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "enum": [
                                  "cost-basis",
                                  "scope-baseline",
                                  "meeting-attribution",
                                  "ai-attribution",
                                  "reporting-period",
                                  "work-cost-allocation"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "default",
                                  "option",
                                  "manual",
                                  "date_range"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "needs_verification",
                                  "confirmed",
                                  "rectified"
                                ],
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "unitOrMethod": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "value": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "versionId": {
                                "anyOf": [
                                  {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "value",
                              "unitOrMethod",
                              "source",
                              "status",
                              "effectiveFrom",
                              "effectiveTo",
                              "versionId"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "confidence": {
                          "additionalProperties": false,
                          "properties": {
                            "hints": {
                              "default": [],
                              "items": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "label": {
                              "default": "Not measured",
                              "enum": [
                                "High",
                                "Medium",
                                "Low",
                                "Not measured"
                              ],
                              "type": "string"
                            },
                            "score": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "signals": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "contribution": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "evidence": {
                                    "additionalProperties": false,
                                    "default": {
                                      "denominator": null,
                                      "numerator": null,
                                      "query": "Evidence path was not recorded in this historical snapshot."
                                    },
                                    "properties": {
                                      "denominator": {
                                        "anyOf": [
                                          {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "numerator": {
                                        "anyOf": [
                                          {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "query": {
                                        "default": "Evidence path was not recorded in this historical snapshot.",
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "numerator",
                                      "denominator",
                                      "query"
                                    ],
                                    "type": "object"
                                  },
                                  "id": {
                                    "enum": [
                                      "prs_linked",
                                      "items_mapped",
                                      "meetings_tagged",
                                      "rate_card",
                                      "ai_tagging",
                                      "release_evidence",
                                      "manual_entry_share",
                                      "freshness",
                                      "assumptions"
                                    ],
                                    "type": "string"
                                  },
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "note": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "pct": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "default": 1,
                                    "exclusiveMinimum": 0,
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "pct",
                                  "weight",
                                  "contribution",
                                  "evidence",
                                  "note"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "score",
                            "label",
                            "signals",
                            "hints"
                          ],
                          "type": "object"
                        },
                        "coordination": {
                          "additionalProperties": false,
                          "properties": {
                            "blendedHourlyRateCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "costCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "declined": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "hours": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "meetings": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "taggingPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "meetings",
                            "hours",
                            "declined",
                            "costCents",
                            "blendedHourlyRateCents",
                            "taggingPct"
                          ],
                          "type": "object"
                        },
                        "currency": {
                          "anyOf": [
                            {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "delivery": {
                          "additionalProperties": false,
                          "properties": {
                            "completedItems": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "mergedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "milestones": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "objectivesCompleted": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "objectivesTotal": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "prsLinkedPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "releaseRows": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "items": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "releasedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "releaseId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "releaseId",
                                  "name",
                                  "releasedAt",
                                  "items"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "releases": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "rows": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "completedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "externalKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "linkedChanges": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  "url": {
                                    "anyOf": [
                                      {
                                        "format": "uri",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workItemId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "workItemId",
                                  "title",
                                  "externalKey",
                                  "type",
                                  "linkedChanges",
                                  "completedAt",
                                  "url"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "completedItems",
                            "mergedChanges",
                            "releases",
                            "milestones",
                            "objectivesTotal",
                            "objectivesCompleted",
                            "prsLinkedPct",
                            "rows",
                            "releaseRows"
                          ],
                          "type": "object"
                        },
                        "evidencePackages": {
                          "default": [],
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "caseId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "contentHash": {
                                "type": "string"
                              },
                              "createdAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "snapshot": {
                                "additionalProperties": false,
                                "properties": {
                                  "case": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "agencyName": {
                                        "type": "string"
                                      },
                                      "clientName": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "confidence": {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "id": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "periodEnd": {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      "periodLabel": {
                                        "type": "string"
                                      },
                                      "periodStart": {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      "projectName": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "enum": [
                                          "Open",
                                          "Investigating",
                                          "Evidence gathered",
                                          "Disposition",
                                          "Resolved",
                                          "Filed"
                                        ],
                                        "type": "string"
                                      },
                                      "subtitle": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "typology": {
                                        "anyOf": [
                                          {
                                            "enum": [
                                              "expansion",
                                              "acdrift",
                                              "rework",
                                              "untraced",
                                              "cost"
                                            ],
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "subtitle",
                                      "status",
                                      "typology",
                                      "periodStart",
                                      "periodEnd",
                                      "periodLabel",
                                      "clientName",
                                      "projectName",
                                      "agencyName",
                                      "confidence"
                                    ],
                                    "type": "object"
                                  },
                                  "claims": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "id": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "nodeIds": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "text": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "text",
                                        "nodeIds",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "custody": {
                                    "additionalProperties": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "id": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "kind": {
                                            "enum": [
                                              "jira",
                                              "pr",
                                              "release",
                                              "meeting",
                                              "note"
                                            ],
                                            "type": "string"
                                          },
                                          "meta": {
                                            "type": "string"
                                          },
                                          "t": {
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "id",
                                          "t",
                                          "meta"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "draft": {
                                    "type": "boolean"
                                  },
                                  "engine": {
                                    "enum": [
                                      "template",
                                      "claude"
                                    ],
                                    "type": "string"
                                  },
                                  "flags": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "detail": {
                                          "type": "string"
                                        },
                                        "disposition": {
                                          "anyOf": [
                                            {
                                              "enum": [
                                                "inscope",
                                                "cr",
                                                "billable",
                                                "writeoff",
                                                "decision"
                                              ],
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "dispositionLabel": {
                                          "type": "string"
                                        },
                                        "evidenceMissing": {
                                          "type": "boolean"
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "impact": {
                                          "type": "string"
                                        },
                                        "impactCents": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "nodeIds": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "rationale": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "resolvedAt": {
                                          "anyOf": [
                                            {
                                              "format": "date-time",
                                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "severity": {
                                          "enum": [
                                            "amber",
                                            "red"
                                          ],
                                          "type": "string"
                                        },
                                        "signalKey": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "type": "string"
                                        },
                                        "typology": {
                                          "enum": [
                                            "added-after-lock",
                                            "reopened-from",
                                            "estimate-growth",
                                            "meeting-overrun",
                                            "untraced"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "signalKey",
                                        "typology",
                                        "severity",
                                        "title",
                                        "detail",
                                        "impact",
                                        "impactCents",
                                        "nodeIds",
                                        "disposition",
                                        "dispositionLabel",
                                        "rationale",
                                        "resolvedAt",
                                        "evidenceMissing",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "generatedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "memo",
                                      "cr",
                                      "qbr"
                                    ],
                                    "type": "string"
                                  },
                                  "notes": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "at": {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "authorName": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "body": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "targetNodeId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "authorName",
                                        "at",
                                        "targetNodeId",
                                        "body",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "prose": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "sections": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "body": {
                                              "minLength": 1,
                                              "type": "string"
                                            },
                                            "heading": {
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "heading",
                                            "body"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "summary": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "title": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "title",
                                      "summary",
                                      "sections"
                                    ],
                                    "type": "object"
                                  },
                                  "provenance": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "graphBuild": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "graphHash": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "id": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "profile": {
                                                "type": "string"
                                              },
                                              "rulesVersion": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "graphHash",
                                              "rulesVersion",
                                              "profile"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "lock": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "approvalRef": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "authority": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "effectiveAt": {
                                                "format": "date-time",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                                "type": "string"
                                              },
                                              "lockedOn": {
                                                "format": "date",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                "type": "string"
                                              },
                                              "lockId": {
                                                "anyOf": [
                                                  {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "memberCount": {
                                                "anyOf": [
                                                  {
                                                    "maximum": 9007199254740991,
                                                    "minimum": 0,
                                                    "type": "integer"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "provenance": {
                                                "enum": [
                                                  "explicit",
                                                  "register_scope_lock_date",
                                                  "engagement_starts_on"
                                                ],
                                                "type": "string"
                                              },
                                              "reconstructed": {
                                                "type": "boolean"
                                              },
                                              "resolverVersion": {
                                                "type": "string"
                                              },
                                              "timeZone": {
                                                "type": "string"
                                              },
                                              "version": {
                                                "anyOf": [
                                                  {
                                                    "maximum": 9007199254740991,
                                                    "minimum": 1,
                                                    "type": "integer"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "lockId",
                                              "version",
                                              "lockedOn",
                                              "effectiveAt",
                                              "timeZone",
                                              "provenance",
                                              "reconstructed",
                                              "authority",
                                              "approvalRef",
                                              "memberCount",
                                              "resolverVersion"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "lock",
                                      "graphBuild"
                                    ],
                                    "type": "object"
                                  },
                                  "version": {
                                    "const": 1,
                                    "type": "number"
                                  },
                                  "watermark": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "version",
                                  "kind",
                                  "draft",
                                  "watermark",
                                  "case",
                                  "flags",
                                  "notes",
                                  "custody",
                                  "claims",
                                  "prose",
                                  "engine",
                                  "generatedAt"
                                ],
                                "type": "object"
                              },
                              "status": {
                                "enum": [
                                  "draft",
                                  "final"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "caseId",
                              "kind",
                              "status",
                              "contentHash",
                              "createdAt",
                              "snapshot"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "investment": {
                          "additionalProperties": false,
                          "properties": {
                            "cloudCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "coordinationCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "coordinationPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "costEvidence": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cloudLines": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "linkedTimeEntries": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "timeEntries": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "timeEntries",
                                    "linkedTimeEntries",
                                    "cloudLines"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "currencyConflict": {
                              "default": false,
                              "type": "boolean"
                            },
                            "estimated": {
                              "default": false,
                              "type": "boolean"
                            },
                            "estimatedCloudCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "invoicedCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourCategories": {
                              "anyOf": [
                                {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "category": {
                                        "enum": [
                                          "feature",
                                          "bug",
                                          "other_linked",
                                          "unlinked"
                                        ],
                                        "type": "string"
                                      },
                                      "cents": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "hours": {
                                        "minimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "category",
                                      "cents",
                                      "hours"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "reworkCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reworkPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "roleBandHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "scopeCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scopePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "totalCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "unpricedHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "totalCents",
                            "labourCents",
                            "labourHours",
                            "unpricedHours",
                            "roleBandHours",
                            "cloudCents",
                            "estimatedCloudCents",
                            "estimated",
                            "invoicedCents",
                            "coordinationCents",
                            "coordinationPct",
                            "scopeCents",
                            "scopePct",
                            "reworkCents",
                            "reworkPct",
                            "labourCategories",
                            "currencyConflict",
                            "costEvidence"
                          ],
                          "type": "object"
                        },
                        "manualEntrySharePct": {
                          "anyOf": [
                            {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "scope": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "addedCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "addedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "grownCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "grownItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "priced": {
                                  "type": "boolean"
                                },
                                "reopenedCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "reopenedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "scopeLockOn": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "totalCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "unestimated": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "scopeLockOn",
                                "totalCents",
                                "priced",
                                "addedItems",
                                "addedCents",
                                "reopenedItems",
                                "reopenedCents",
                                "grownItems",
                                "grownCents",
                                "unestimated",
                                "blendedHourlyRateCents"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sources": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "projectRows": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "reason": {
                                "enum": [
                                  "no_activity",
                                  "unattributed",
                                  "empty"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "commercial",
                                  "tracker",
                                  "code",
                                  "release",
                                  "calendar"
                                ],
                                "type": "string"
                              },
                              "state": {
                                "enum": [
                                  "data_present",
                                  "not_connected",
                                  "no_data"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "source",
                              "state",
                              "label"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "currency",
                        "delivery",
                        "investment",
                        "scope",
                        "coordination",
                        "ai",
                        "aiInsufficientSample",
                        "confidence",
                        "sources",
                        "manualEntrySharePct",
                        "assumptions",
                        "actions",
                        "evidencePackages"
                      ],
                      "type": "object"
                    },
                    "invoice": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "id": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "issuedOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "lines": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "amountCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "description": {
                                    "maxLength": 1000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "quantity": {
                                    "default": null,
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "role": {
                                    "anyOf": [
                                      {
                                        "maxLength": 100,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "unit": {
                                    "anyOf": [
                                      {
                                        "maxLength": 30,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  }
                                },
                                "required": [
                                  "id",
                                  "description",
                                  "amountCents",
                                  "role",
                                  "quantity",
                                  "unit"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "number": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "periodEnd": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "periodStart": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "totalCents": {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "id",
                            "number",
                            "currency",
                            "totalCents",
                            "issuedOn",
                            "periodStart",
                            "periodEnd",
                            "lines"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pack": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "answer": {
                              "type": "string"
                            },
                            "category": {
                              "type": "string"
                            },
                            "chart": {
                              "oneOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "rows": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "enum": [
                                              "base",
                                              "add",
                                              "total"
                                            ],
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "value",
                                          "kind"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "sub": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "waterfall",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "title",
                                    "sub",
                                    "rows"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "a": {
                                      "items": {
                                        "type": "number"
                                      },
                                      "type": "array"
                                    },
                                    "b": {
                                      "items": {
                                        "type": "number"
                                      },
                                      "type": "array"
                                    },
                                    "labelA": {
                                      "type": "string"
                                    },
                                    "labelB": {
                                      "type": "string"
                                    },
                                    "sub": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "trend",
                                      "type": "string"
                                    },
                                    "unit": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "title",
                                    "sub",
                                    "a",
                                    "b",
                                    "labelA",
                                    "labelB",
                                    "unit"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "data": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "ai": {
                                            "type": "number"
                                          },
                                          "base": {
                                            "type": "number"
                                          },
                                          "l": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "l",
                                          "ai",
                                          "base"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "legendA": {
                                      "type": "string"
                                    },
                                    "legendB": {
                                      "type": "string"
                                    },
                                    "sub": {
                                      "type": "string"
                                    },
                                    "suffixA": {
                                      "type": "string"
                                    },
                                    "suffixB": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "bars",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "title",
                                    "sub",
                                    "data",
                                    "legendA",
                                    "legendB",
                                    "suffixA",
                                    "suffixB"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "eyebrow": {
                              "type": "string"
                            },
                            "headline": {
                              "type": "string"
                            },
                            "kpis": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "note": {
                                    "type": "string"
                                  },
                                  "sub": {
                                    "type": "string"
                                  },
                                  "tone": {
                                    "enum": [
                                      "blue",
                                      "amber",
                                      "teal",
                                      "text"
                                    ],
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "valueCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "label",
                                  "value",
                                  "valueCents",
                                  "sub",
                                  "note",
                                  "tone"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "question": {
                              "additionalProperties": false,
                              "properties": {
                                "cat": {
                                  "type": "string"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "mode": {
                                  "type": "string"
                                },
                                "q": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "cat",
                                "q",
                                "mode"
                              ],
                              "type": "object"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "table": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "action": {
                                    "type": "string"
                                  },
                                  "driver": {
                                    "type": "string"
                                  },
                                  "evidence": {
                                    "type": "string"
                                  },
                                  "evidenceRows": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "id": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "kind": {
                                          "enum": [
                                            "jira",
                                            "linear",
                                            "github",
                                            "gitlab",
                                            "calendar",
                                            "invoice"
                                          ],
                                          "type": "string"
                                        },
                                        "meta": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "title": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "id",
                                        "title",
                                        "meta"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "explanation": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "impact": {
                                    "type": "string"
                                  },
                                  "invoiceLine": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      "description": {
                                        "maxLength": 1000,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "quantity": {
                                        "default": null,
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "role": {
                                        "anyOf": [
                                          {
                                            "maxLength": 100,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "unit": {
                                        "anyOf": [
                                          {
                                            "maxLength": 30,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "description",
                                      "amountCents",
                                      "role",
                                      "quantity",
                                      "unit"
                                    ],
                                    "type": "object"
                                  },
                                  "scopeTiming": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "driver",
                                  "invoiceLine",
                                  "evidence",
                                  "scopeTiming",
                                  "impact",
                                  "explanation",
                                  "action",
                                  "evidenceRows"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "question",
                            "category",
                            "eyebrow",
                            "headline",
                            "answer",
                            "kpis",
                            "chart",
                            "table",
                            "summary"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reconciliation": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "computedCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "currency": {
                              "anyOf": [
                                {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deltaCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "invoice": {
                              "additionalProperties": false,
                              "properties": {
                                "currency": {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                "id": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "issuedOn": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "lines": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      "description": {
                                        "maxLength": 1000,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "quantity": {
                                        "default": null,
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "role": {
                                        "anyOf": [
                                          {
                                            "maxLength": 100,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "unit": {
                                        "anyOf": [
                                          {
                                            "maxLength": 30,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "description",
                                      "amountCents",
                                      "role",
                                      "quantity",
                                      "unit"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "number": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "periodStart": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "totalCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "id",
                                "number",
                                "currency",
                                "totalCents",
                                "issuedOn",
                                "periodStart",
                                "periodEnd",
                                "lines"
                              ],
                              "type": "object"
                            },
                            "invoicedCents": {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            },
                            "lines": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "computedCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "deltaCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "driver": {
                                    "enum": [
                                      "feature_build",
                                      "review",
                                      "rework",
                                      "coordination",
                                      "cloud",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  "evidence": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "id": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "kind": {
                                          "enum": [
                                            "jira",
                                            "linear",
                                            "github",
                                            "gitlab",
                                            "calendar",
                                            "invoice"
                                          ],
                                          "type": "string"
                                        },
                                        "meta": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "title": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "id",
                                        "title",
                                        "meta"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "explanation": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "line": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "amountCents": {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      "description": {
                                        "maxLength": 1000,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "id": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "quantity": {
                                        "default": null,
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "role": {
                                        "anyOf": [
                                          {
                                            "maxLength": 100,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "unit": {
                                        "anyOf": [
                                          {
                                            "maxLength": 30,
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "description",
                                      "amountCents",
                                      "role",
                                      "quantity",
                                      "unit"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "line",
                                  "driver",
                                  "computedCents",
                                  "deltaCents",
                                  "evidence",
                                  "explanation"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "unavailableReason": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "invoice",
                            "currency",
                            "invoicedCents",
                            "computedCents",
                            "deltaCents",
                            "unavailableReason",
                            "lines"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "facts",
                    "invoice",
                    "reconciliation",
                    "pack"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Reconcile invoice facts with delivery",
        "tags": [
          "evidence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "invoice_defense.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start must not follow end; tz must be a recognized IANA time zone and defaults to UTC.",
            "Public reads always return deterministic facts without narrative model execution."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "invoice-defense:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/invoices": {
      "post": {
        "description": "State authoritative invoice totals/lines in integer minor currency units, including signed credit notes. Natural invoice identity preserves upserts. This records evidence and never issues, sends or pays an invoice. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "commercial.invoice",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-commercial.invoice",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "currency": "USD",
                    "engagementId": "22222222-2222-4222-8222-222222222222",
                    "issuedOn": "2026-10-01",
                    "lines": [
                      {
                        "amountCents": 25000,
                        "description": "Example delivery"
                      }
                    ],
                    "number": "EXAMPLE-001",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "totalCents": 25000
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "currency": {
                    "pattern": "^[A-Z]{3}$",
                    "type": "string"
                  },
                  "engagementId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "issuedOn": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "lines": {
                    "default": [],
                    "items": {
                      "properties": {
                        "amountCents": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "description": {
                          "maxLength": 1000,
                          "minLength": 1,
                          "type": "string"
                        },
                        "quantity": {
                          "anyOf": [
                            {
                              "minimum": 0,
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "role": {
                          "anyOf": [
                            {
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unit": {
                          "anyOf": [
                            {
                              "enum": [
                                "hour",
                                "day",
                                "fixed"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unitAmountCents": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workItemExternalKey": {
                          "anyOf": [
                            {
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "description",
                        "amountCents"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "number": {
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "periodEnd": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "periodStart": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "default": "sent",
                    "enum": [
                      "draft",
                      "sent",
                      "paid",
                      "disputed",
                      "void"
                    ],
                    "type": "string"
                  },
                  "totalCents": {
                    "maximum": 9007199254740991,
                    "minimum": -9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "number",
                  "issuedOn",
                  "currency",
                  "totalCents"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "created": true,
                      "id": "11111111-1111-4111-8111-111111111111"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert a manual invoice",
        "tags": [
          "commercial"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "commercial.edit",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "commercial:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/projects/{projectId}/forensics": {
      "get": {
        "description": "Inspect a project's evidence graph, custody and engagement lock for a required ordered date range. UTC is the default timezone. A project without an engagement returns a null graph rather than an invented lock or cost. The complete domain graph is one response, with no pagination. Projection, grouping and scope-lock mutations remain separate internal operations. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart must not follow end; tz must be a recognized IANA time zone and defaults to UTC.\n\nThe effective plan's historical reporting window is enforced before reading evidence.",
        "operationId": "forensics.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-07",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "engagement": null,
                      "graph": null,
                      "lock": null,
                      "period": {
                        "end": "2026-10-01",
                        "start": "2026-10-01",
                        "timeZone": "UTC"
                      },
                      "project": {
                        "clientName": "Synthetic visible client",
                        "id": "11111111-1111-4111-8111-111111111111",
                        "name": "Synthetic visible project"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "engagement": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "id": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "name": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "scopeLockOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "scopeLockOn",
                            "currency"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "graph": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "baselineItems": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "chains": {
                              "additionalProperties": false,
                              "properties": {
                                "cost": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "edges": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "nodes": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "target": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "nodes",
                                        "edges",
                                        "target"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "untraced": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "edges": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "nodes": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "target": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "nodes",
                                        "edges",
                                        "target"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "verdict": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "edges": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "nodes": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "target": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "nodes",
                                        "edges",
                                        "target"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "cost",
                                "untraced",
                                "verdict"
                              ],
                              "type": "object"
                            },
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "custody": {
                              "additionalProperties": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "id": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "kind": {
                                      "enum": [
                                        "jira",
                                        "pr",
                                        "release",
                                        "meeting",
                                        "note"
                                      ],
                                      "type": "string"
                                    },
                                    "meta": {
                                      "type": "string"
                                    },
                                    "t": {
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id",
                                    "t",
                                    "meta"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "edges": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "flag": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "amber",
                                          "red"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "from": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "key": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "rel": {
                                    "enum": [
                                      "locks",
                                      "contains",
                                      "shipped-in",
                                      "implemented-by",
                                      "delivers",
                                      "discussed-in",
                                      "costs",
                                      "untraced"
                                    ],
                                    "type": "string"
                                  },
                                  "soft": {
                                    "type": "boolean"
                                  },
                                  "to": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "key",
                                  "from",
                                  "to",
                                  "rel",
                                  "flag",
                                  "soft"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "flags": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "detail": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "impact": {
                                    "type": "string"
                                  },
                                  "impactCents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "nodes": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "severity": {
                                    "enum": [
                                      "amber",
                                      "red"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "typology": {
                                    "enum": [
                                      "added-after-lock",
                                      "reopened-from",
                                      "estimate-growth",
                                      "meeting-overrun",
                                      "untraced"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "typology",
                                  "severity",
                                  "title",
                                  "detail",
                                  "impact",
                                  "impactCents",
                                  "nodes"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "nodes": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "col": {
                                    "type": "number"
                                  },
                                  "conf": {
                                    "enum": [
                                      "traced",
                                      "partial",
                                      "untraced"
                                    ],
                                    "type": "string"
                                  },
                                  "cost": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "ref": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "externalKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "id": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "kind": {
                                        "enum": [
                                          "work_item",
                                          "code_change",
                                          "release",
                                          "calendar_event",
                                          "engagement",
                                          "derived"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "externalKey",
                                      "url"
                                    ],
                                    "type": "object"
                                  },
                                  "row": {
                                    "type": "number"
                                  },
                                  "sub": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "objective",
                                      "baseline",
                                      "epic",
                                      "item",
                                      "pr",
                                      "release",
                                      "meeting",
                                      "cost",
                                      "outcome"
                                    ],
                                    "type": "string"
                                  },
                                  "untraced": {
                                    "type": "boolean"
                                  },
                                  "warn": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "amber",
                                          "red"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "label",
                                  "sub",
                                  "col",
                                  "row",
                                  "conf",
                                  "warn",
                                  "cost",
                                  "untraced",
                                  "ref"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "scopeLockOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "shown": {
                              "additionalProperties": false,
                              "properties": {
                                "items": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "total": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "items",
                                "total"
                              ],
                              "type": "object"
                            },
                            "signals": {
                              "additionalProperties": false,
                              "properties": {
                                "cleanShipped": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "eventsScreened": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "typologyHits": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "untraced": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "eventsScreened",
                                "typologyHits",
                                "untraced",
                                "cleanShipped"
                              ],
                              "type": "object"
                            },
                            "timeline": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "cents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "date": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "desc": {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "plan",
                                      "add",
                                      "rework",
                                      "clar",
                                      "ship"
                                    ],
                                    "type": "string"
                                  },
                                  "tag": {
                                    "maxLength": 40,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "workItemIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "id",
                                  "date",
                                  "kind",
                                  "tag",
                                  "title",
                                  "desc",
                                  "cents",
                                  "workItemIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "typologies": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "available": {
                                    "type": "boolean"
                                  },
                                  "color": {
                                    "enum": [
                                      "slate",
                                      "amber",
                                      "red",
                                      "blue"
                                    ],
                                    "type": "string"
                                  },
                                  "cost": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "count": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "desc": {
                                    "type": "string"
                                  },
                                  "glyph": {
                                    "enum": [
                                      "eye",
                                      "expand",
                                      "pencil",
                                      "unlink",
                                      "coin"
                                    ],
                                    "type": "string"
                                  },
                                  "id": {
                                    "enum": [
                                      "all",
                                      "expansion",
                                      "acdrift",
                                      "rework",
                                      "untraced",
                                      "cost"
                                    ],
                                    "type": "string"
                                  },
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "nodes": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "sizeByCost": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "glyph",
                                  "color",
                                  "cost",
                                  "count",
                                  "nodes",
                                  "desc",
                                  "sizeByCost",
                                  "available"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "scopeLockOn",
                            "currency",
                            "baselineItems",
                            "nodes",
                            "edges",
                            "typologies",
                            "chains",
                            "custody",
                            "flags",
                            "signals",
                            "timeline",
                            "shown"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lock": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "approvalRef": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "authority": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "effectiveAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            "lockedOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "lockId": {
                              "anyOf": [
                                {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "memberCount": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provenance": {
                              "enum": [
                                "explicit",
                                "register_scope_lock_date",
                                "engagement_starts_on"
                              ],
                              "type": "string"
                            },
                            "reconstructed": {
                              "type": "boolean"
                            },
                            "resolverVersion": {
                              "type": "string"
                            },
                            "timeZone": {
                              "type": "string"
                            },
                            "version": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "lockId",
                            "version",
                            "lockedOn",
                            "effectiveAt",
                            "timeZone",
                            "provenance",
                            "reconstructed",
                            "authority",
                            "approvalRef",
                            "memberCount",
                            "resolverVersion"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "period": {
                      "additionalProperties": false,
                      "properties": {
                        "end": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "start": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "timeZone": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "timeZone"
                      ],
                      "type": "object"
                    },
                    "project": {
                      "additionalProperties": false,
                      "properties": {
                        "clientName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "name": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "clientName"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "project",
                    "engagement",
                    "period",
                    "graph"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read a project's evidence graph",
        "tags": [
          "evidence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "forensics.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start must not follow end; tz must be a recognized IANA time zone and defaults to UTC.",
            "The effective plan's historical reporting window is enforced before reading evidence."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "forensics:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/projects/{projectId}/scope-creep": {
      "get": {
        "description": "Read the selected project's scope baseline, changes and valuation for a required ordered date range. UTC is the default timezone. A project without an engagement has a null report; uncertain attribution and unsupported valuation remain explicit. This is a single derived report rather than a paginated work-item export, and it does not create a change-request narrative. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart must not follow end; tz must be a recognized IANA time zone and defaults to UTC.\n\nThe effective plan's historical reporting window is enforced before reading evidence.",
        "operationId": "scope.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "path",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-10-07",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "engagement": null,
                      "lock": null,
                      "project": {
                        "clientName": "Synthetic visible client",
                        "id": "11111111-1111-4111-8111-111111111111",
                        "name": "Synthetic visible project"
                      },
                      "report": null
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "engagement": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "id": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "name": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "scopeLockOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "scopeLockOn",
                            "currency"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lock": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "approvalRef": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "authority": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "effectiveAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            "lockedOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "lockId": {
                              "anyOf": [
                                {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "memberCount": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provenance": {
                              "enum": [
                                "explicit",
                                "register_scope_lock_date",
                                "engagement_starts_on"
                              ],
                              "type": "string"
                            },
                            "reconstructed": {
                              "type": "boolean"
                            },
                            "resolverVersion": {
                              "type": "string"
                            },
                            "timeZone": {
                              "type": "string"
                            },
                            "version": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "lockId",
                            "version",
                            "lockedOn",
                            "effectiveAt",
                            "timeZone",
                            "provenance",
                            "reconstructed",
                            "authority",
                            "approvalRef",
                            "memberCount",
                            "resolverVersion"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "project": {
                      "additionalProperties": false,
                      "properties": {
                        "clientName": {
                          "anyOf": [
                            {
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "name": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "clientName"
                      ],
                      "type": "object"
                    },
                    "report": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "baselineItems": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "items": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "addedAt": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "addedCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "cents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "claims": {
                                    "items": {
                                      "enum": [
                                        "added",
                                        "reopened",
                                        "estimate_growth"
                                      ],
                                      "type": "string"
                                    },
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "estimate": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "estimateGrowth": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "estimateGrowthAt": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "estimateUnit": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "points",
                                          "hours"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalId": {
                                    "maxLength": 512,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "externalKey": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "growthCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "hours": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "reopenedAt": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reopenedCents": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "source": {
                                    "enum": [
                                      "jira",
                                      "linear",
                                      "azure_devops",
                                      "github",
                                      "asana",
                                      "manual",
                                      "csv"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "maxLength": 1000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "url": {
                                    "anyOf": [
                                      {
                                        "format": "uri",
                                        "maxLength": 2048,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workItemId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "workItemId",
                                  "source",
                                  "externalId",
                                  "externalKey",
                                  "url",
                                  "title",
                                  "claims",
                                  "addedAt",
                                  "reopenedAt",
                                  "estimateGrowthAt",
                                  "estimate",
                                  "estimateUnit",
                                  "estimateGrowth",
                                  "addedCents",
                                  "reopenedCents",
                                  "growthCents",
                                  "hours",
                                  "cents"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "period": {
                              "additionalProperties": false,
                              "properties": {
                                "end": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "start": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "start",
                                "end"
                              ],
                              "type": "object"
                            },
                            "scopeLockOn": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "signals": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "changeExternalId": {
                                    "anyOf": [
                                      {
                                        "maxLength": 512,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "estimateDelta": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "estimateUnit": {
                                    "anyOf": [
                                      {
                                        "enum": [
                                          "points",
                                          "hours"
                                        ],
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalId": {
                                    "maxLength": 512,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "externalKey": {
                                    "anyOf": [
                                      {
                                        "maxLength": 120,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "fromValue": {
                                    "anyOf": [
                                      {
                                        "maxLength": 500,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "kind": {
                                    "enum": [
                                      "added_after_scope_lock",
                                      "reopened",
                                      "estimate_changed"
                                    ],
                                    "type": "string"
                                  },
                                  "occurredAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "jira",
                                      "linear",
                                      "azure_devops",
                                      "github",
                                      "asana",
                                      "manual",
                                      "csv"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "maxLength": 1000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "toValue": {
                                    "anyOf": [
                                      {
                                        "maxLength": 500,
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workItemId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "workItemId",
                                  "source",
                                  "externalId",
                                  "externalKey",
                                  "title",
                                  "occurredAt",
                                  "changeExternalId",
                                  "fromValue",
                                  "toValue",
                                  "estimateDelta",
                                  "estimateUnit"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "timeline": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "cents": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "date": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "desc": {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  "id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "plan",
                                      "add",
                                      "rework",
                                      "clar",
                                      "ship"
                                    ],
                                    "type": "string"
                                  },
                                  "tag": {
                                    "maxLength": 40,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "workItemIds": {
                                    "items": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "id",
                                  "date",
                                  "kind",
                                  "tag",
                                  "title",
                                  "desc",
                                  "cents",
                                  "workItemIds"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "valuation": {
                              "additionalProperties": false,
                              "properties": {
                                "added": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "count": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "hours": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "hours",
                                    "cents",
                                    "unestimated"
                                  ],
                                  "type": "object"
                                },
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "conventions": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "hoursPerDay": {
                                      "exclusiveMinimum": 0,
                                      "type": "number"
                                    },
                                    "hoursPerPoint": {
                                      "exclusiveMinimum": 0,
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "hoursPerPoint",
                                    "hoursPerDay"
                                  ],
                                  "type": "object"
                                },
                                "currency": {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                "estimateGrowth": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "count": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "deltaByUnit": {
                                      "additionalProperties": {
                                        "type": "number"
                                      },
                                      "propertyNames": {
                                        "enum": [
                                          "points",
                                          "hours"
                                        ],
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "hours": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "hours",
                                    "cents",
                                    "unestimated",
                                    "deltaByUnit"
                                  ],
                                  "type": "object"
                                },
                                "ratesConsidered": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "reopened": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "count": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "hours": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "hours",
                                    "cents",
                                    "unestimated"
                                  ],
                                  "type": "object"
                                },
                                "totalCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "totalHours": {
                                  "minimum": 0,
                                  "type": "number"
                                }
                              },
                              "required": [
                                "currency",
                                "totalCents",
                                "totalHours",
                                "blendedHourlyRateCents",
                                "ratesConsidered",
                                "conventions",
                                "added",
                                "reopened",
                                "estimateGrowth"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "scopeLockOn",
                            "period",
                            "baselineItems",
                            "valuation",
                            "items",
                            "timeline",
                            "signals"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "project",
                    "engagement",
                    "report"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read scope expansion evidence",
        "tags": [
          "evidence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "scope.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start must not follow end; tz must be a recognized IANA time zone and defaults to UTC.",
            "The effective plan's historical reporting window is enforced before reading evidence."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scope-creep:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder": {
      "get": {
        "description": "Read saved reports, current snapshot IDs and existing pooled usage, optionally selecting one client/project. Stored share grants/hashes are omitted. Newest update first; no pagination. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "reports": [
                        {
                          "context": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "clientName": "example-reports Retail",
                            "period": "Q1 2026",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "projectName": "example-reports Checkout Replatform",
                            "qid": null,
                            "timeRange": "Jan 1–Mar 31"
                          },
                          "createdAt": "2026-10-01T08:30:28.684Z",
                          "id": "33333333-3333-4333-8333-333333333333",
                          "lastSharedAt": null,
                          "name": "Synthetic delivery report",
                          "shares": [],
                          "snapshotId": "44444444-4444-4444-8444-444444444444",
                          "status": "draft",
                          "updatedAt": "2026-10-01T08:30:28.684Z"
                        }
                      ],
                      "usage": {
                        "branded": false,
                        "cap": "unlimited",
                        "effectivePlan": "growth",
                        "shippedThisMonth": 0
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "reports": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "context": {
                            "additionalProperties": false,
                            "properties": {
                              "clientId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "clientName": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "period": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "periodEnd": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "periodStart": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "projectId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "projectName": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "qid": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "timeRange": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "clientId",
                              "clientName",
                              "projectId",
                              "projectName",
                              "periodStart",
                              "periodEnd",
                              "period",
                              "timeRange",
                              "qid"
                            ],
                            "type": "object"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "lastSharedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "snapshotId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "draft",
                              "shipped"
                            ],
                            "type": "string"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status",
                          "context",
                          "snapshotId",
                          "lastSharedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "usage": {
                      "additionalProperties": false,
                      "properties": {
                        "branded": {
                          "type": "boolean"
                        },
                        "cap": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "const": "unlimited",
                              "type": "string"
                            }
                          ]
                        },
                        "effectivePlan": {
                          "enum": [
                            "free",
                            "entry",
                            "starter",
                            "growth",
                            "scale"
                          ],
                          "type": "string"
                        },
                        "shippedThisMonth": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "shippedThisMonth",
                        "cap",
                        "effectivePlan",
                        "branded"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "reports",
                    "usage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read the saved report library",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:read",
          "stability": "stable"
        }
      },
      "post": {
        "description": "Save a draft by default, or ship within the existing monthly report allowance when ship is true. Optional id freezes a new immutable revision of the same existing report/project. One successful receipt produces one snapshot and attributable audit chain. No delivery or share-token creation occurs. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.create",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-reports.create",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "composition": {
                      "context": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "clientName": "Synthetic customer",
                        "period": "Q1 2026",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "projectName": "Synthetic delivery",
                        "qid": null,
                        "timeRange": "Jan 1–Mar 31"
                      },
                      "items": {},
                      "layout": {
                        "order": [
                          "rs1",
                          "rs2",
                          "rs3",
                          "rs4",
                          "rs5",
                          "rs6",
                          "rs7",
                          "rs8",
                          "rs9",
                          "rs10"
                        ],
                        "sections": {
                          "rs1": true,
                          "rs10": true,
                          "rs2": true,
                          "rs3": true,
                          "rs4": true,
                          "rs5": true,
                          "rs6": true,
                          "rs7": false,
                          "rs8": true,
                          "rs9": true
                        }
                      },
                      "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                      "narrativeProvenance": {
                        "modelId": null,
                        "outcome": "template",
                        "promptVersion": null,
                        "provider": null
                      },
                      "tone": "default"
                    },
                    "name": "Synthetic delivery report",
                    "ship": false
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "composition": {
                    "properties": {
                      "context": {
                        "properties": {
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "clientName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "period": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "periodEnd": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "periodStart": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "projectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "projectName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "qid": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "timeRange": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "clientId",
                          "clientName",
                          "projectId",
                          "projectName",
                          "periodStart",
                          "periodEnd",
                          "period",
                          "timeRange",
                          "qid"
                        ],
                        "type": "object"
                      },
                      "invoiceNarratives": {
                        "additionalProperties": {
                          "maxLength": 20000,
                          "type": "string"
                        },
                        "propertyNames": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "items": {
                        "properties": {
                          "ai": {
                            "additionalProperties": {
                              "type": "boolean"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "forensics": {
                            "additionalProperties": {
                              "type": "boolean"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "invoice": {
                            "additionalProperties": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "layout": {
                        "properties": {
                          "order": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "sections": {
                            "anyOf": [
                              {
                                "additionalProperties": {
                                  "type": "boolean"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "order",
                          "sections"
                        ],
                        "type": "object"
                      },
                      "narrative": {
                        "maxLength": 20000,
                        "type": "string"
                      },
                      "narrativeProvenance": {
                        "properties": {
                          "modelId": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "outcome": {
                            "enum": [
                              "template",
                              "generated"
                            ],
                            "type": "string"
                          },
                          "promptVersion": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "provider": {
                            "anyOf": [
                              {
                                "enum": [
                                  "openai",
                                  "anthropic"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "outcome",
                          "provider",
                          "modelId",
                          "promptVersion"
                        ],
                        "type": "object"
                      },
                      "tone": {
                        "enum": [
                          "default",
                          "executive",
                          "friendly",
                          "custom"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "context",
                      "layout",
                      "items",
                      "narrative",
                      "tone"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "ship": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "composition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "document": {
                        "agencyName": "Example report workspace",
                        "branded": false,
                        "composition": {
                          "context": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "clientName": "example-reports Retail",
                            "period": "Q1 2026",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "projectName": "example-reports Checkout Replatform",
                            "qid": null,
                            "timeRange": "Jan 1–Mar 31"
                          },
                          "items": {},
                          "layout": {
                            "order": [
                              "rs1",
                              "rs2",
                              "rs3",
                              "rs4",
                              "rs5",
                              "rs6",
                              "rs7",
                              "rs8",
                              "rs9",
                              "rs10"
                            ],
                            "sections": {
                              "rs1": true,
                              "rs10": true,
                              "rs2": true,
                              "rs3": true,
                              "rs4": true,
                              "rs5": true,
                              "rs6": true,
                              "rs7": false,
                              "rs8": true,
                              "rs9": true
                            }
                          },
                          "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                          "narrativeProvenance": {
                            "modelId": null,
                            "outcome": "template",
                            "promptVersion": null,
                            "provider": null
                          },
                          "tone": "default"
                        },
                        "facts": {
                          "actions": [
                            {
                              "action": "Review added items with the client and formalize the next-cycle scope.",
                              "n": 1,
                              "tag": "Margin",
                              "title": "Convert scope expansion into a change request",
                              "tone": "amber",
                              "why": "$6,600 of estimated delivery investment came from work added after scope lock."
                            },
                            {
                              "action": "Create a dedicated discovery / clarification budget bucket.",
                              "n": 2,
                              "tag": "Process",
                              "title": "Separate discovery from implementation budget",
                              "tone": "blue",
                              "why": "1 meetings (1 h) were attributed to this project."
                            },
                            {
                              "action": "Require ticket IDs in branch names and PR titles.",
                              "n": 3,
                              "tag": "Data",
                              "title": "Improve ticket-to-PR traceability",
                              "tone": "neutral",
                              "why": "0% of PRs were not linked to tickets."
                            },
                            {
                              "action": "Add an AI-assisted field or label to relevant work items.",
                              "n": 4,
                              "tag": "AI",
                              "title": "Track AI-assisted work explicitly",
                              "tone": "purple",
                              "why": "AI-assisted delivery cannot be measured until assisted work is tagged."
                            },
                            {
                              "action": "Use the executive summary and scope expansion sections in the next QBR or invoice discussion.",
                              "n": 5,
                              "tag": "Client",
                              "title": "Use this report in the next client review",
                              "tone": "green",
                              "why": "The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions."
                            }
                          ],
                          "ai": null,
                          "aiInsufficientSample": null,
                          "assumptions": [
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "cost-basis",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Cost estimate basis",
                              "unitOrMethod": "person_then_role",
                              "value": "$150/h",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "scope-baseline",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Scope baseline",
                              "unitOrMethod": "engagement_start",
                              "value": "1 work items",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "meeting-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Meeting attribution",
                              "unitOrMethod": "project_tagged",
                              "value": "100% tagged",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "ai-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "AI attribution",
                              "unitOrMethod": "self_reported",
                              "value": "Self-reported labels and trailers",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "reporting-period",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Reporting period",
                              "unitOrMethod": "active_range",
                              "value": "Jan 1 – Mar 31, 2026",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "work-cost-allocation",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Work-item cost allocation",
                              "unitOrMethod": "not_allocated",
                              "value": "Team estimate only",
                              "versionId": null
                            }
                          ],
                          "confidence": {
                            "hints": [
                              "Tag calendar events with the client or project.",
                              "Add person-level rates for worked hours; role rates remain partial.",
                              "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                              "Reconnect or sync sources so their latest successful data is current.",
                              "Confirm or rectify the reporting assumptions used for this period.",
                              "Connect deployment evidence to completed work items."
                            ],
                            "label": "Medium",
                            "score": 80,
                            "signals": [
                              {
                                "contribution": 29.63,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 2,
                                  "query": "Merged code changes linked to normalized work items in the report period."
                                },
                                "id": "prs_linked",
                                "label": "PRs linked to tickets",
                                "note": "Linked merged changes",
                                "pct": 100,
                                "weight": 16
                              },
                              {
                                "contribution": 25.93,
                                "evidence": {
                                  "denominator": 3,
                                  "numerator": 3,
                                  "query": "Workspace work items in the report period with a normalized project mapping."
                                },
                                "id": "items_mapped",
                                "label": "Tickets mapped to client / project",
                                "note": "Workspace mapping coverage",
                                "pct": 100,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "An active Google Calendar connection is required before calendar tagging is measured."
                                },
                                "id": "meetings_tagged",
                                "label": "Meetings tagged to client / project",
                                "note": "No active calendar source",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                                },
                                "id": "rate_card",
                                "label": "Rate card precision",
                                "note": "No labour hours in this period",
                                "pct": null,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                                },
                                "id": "ai_tagging",
                                "label": "AI-assisted work tagging",
                                "note": "Not tagged",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": 9.26,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 1,
                                  "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                                },
                                "id": "release_evidence",
                                "label": "Release / deployment evidence",
                                "note": "Completed work with linked release evidence",
                                "pct": 50,
                                "weight": 10
                              },
                              {
                                "contribution": 14.81,
                                "evidence": {
                                  "denominator": 100,
                                  "numerator": 100,
                                  "query": "Synced rather than manual or CSV evidence rows in the report context."
                                },
                                "id": "manual_entry_share",
                                "label": "Synced evidence share",
                                "note": "Synced evidence coverage",
                                "pct": 100,
                                "weight": 8
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Latest successful sync per active connection, measured against the report period end."
                                },
                                "id": "freshness",
                                "label": "Source freshness",
                                "note": "No active sources",
                                "pct": null,
                                "weight": 8
                              },
                              {
                                "contribution": 0,
                                "evidence": {
                                  "denominator": 6,
                                  "numerator": 0,
                                  "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                                },
                                "id": "assumptions",
                                "label": "Confirmed reporting assumptions",
                                "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                                "pct": 0,
                                "weight": 6
                              }
                            ]
                          },
                          "coordination": {
                            "blendedHourlyRateCents": 15000,
                            "costCents": 15000,
                            "declined": 0,
                            "hours": 1,
                            "meetings": 1,
                            "taggingPct": 100
                          },
                          "currency": "USD",
                          "delivery": {
                            "completedItems": 2,
                            "mergedChanges": 2,
                            "milestones": 0,
                            "objectivesCompleted": 0,
                            "objectivesTotal": 0,
                            "prsLinkedPct": 100,
                            "releaseRows": [
                              {
                                "items": 1,
                                "name": "v1.4.0",
                                "releasedAt": "2026-02-12T18:00:00.000Z",
                                "releaseId": "00000000-0000-4000-8000-000000000007"
                              }
                            ],
                            "releases": 1,
                            "rows": [
                              {
                                "completedAt": "2026-03-01T10:00:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-42",
                                "linkedChanges": 1,
                                "title": "Refunds fail for split tender",
                                "type": "bug",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000005"
                              },
                              {
                                "completedAt": "2026-02-10T16:30:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-1",
                                "linkedChanges": 1,
                                "title": "Card vault migration",
                                "type": "story",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000006"
                              }
                            ]
                          },
                          "evidencePackages": [],
                          "investment": {
                            "cloudCents": 0,
                            "coordinationCents": 15000,
                            "coordinationPct": null,
                            "costEvidence": {
                              "cloudLines": 0,
                              "linkedTimeEntries": 0,
                              "timeEntries": 0
                            },
                            "currencyConflict": false,
                            "estimated": false,
                            "estimatedCloudCents": 0,
                            "invoicedCents": null,
                            "labourCategories": [],
                            "labourCents": 0,
                            "labourHours": 0,
                            "reworkCents": 0,
                            "reworkPct": null,
                            "roleBandHours": 0,
                            "scopeCents": 660000,
                            "scopePct": null,
                            "totalCents": null,
                            "unpricedHours": 0
                          },
                          "manualEntrySharePct": 0,
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "scope": {
                            "addedCents": 660000,
                            "addedItems": 2,
                            "blendedHourlyRateCents": 15000,
                            "grownCents": 0,
                            "grownItems": 0,
                            "priced": true,
                            "reopenedCents": 0,
                            "reopenedItems": 0,
                            "scopeLockOn": "2026-01-01",
                            "totalCents": 660000,
                            "unestimated": 0
                          },
                          "sources": [
                            {
                              "label": "Contracts",
                              "source": "commercial",
                              "state": "data_present"
                            },
                            {
                              "label": "Tracker",
                              "source": "tracker",
                              "state": "data_present"
                            },
                            {
                              "label": "Code",
                              "source": "code",
                              "state": "data_present"
                            },
                            {
                              "label": "Releases",
                              "source": "release",
                              "state": "data_present"
                            },
                            {
                              "label": "Calendar",
                              "source": "calendar",
                              "state": "data_present"
                            }
                          ]
                        },
                        "generatedAt": "2026-10-01T08:30:28.683Z",
                        "teamType": null,
                        "version": 1
                      },
                      "report": {
                        "context": {
                          "clientId": "22222222-2222-4222-8222-222222222222",
                          "clientName": "example-reports Retail",
                          "period": "Q1 2026",
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "projectName": "example-reports Checkout Replatform",
                          "qid": null,
                          "timeRange": "Jan 1–Mar 31"
                        },
                        "createdAt": "2026-10-01T08:30:28.684Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "lastSharedAt": null,
                        "name": "Synthetic delivery report",
                        "shares": [],
                        "snapshotId": "44444444-4444-4444-8444-444444444444",
                        "status": "draft",
                        "updatedAt": "2026-10-01T08:30:28.684Z"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "document": {
                      "additionalProperties": false,
                      "properties": {
                        "agencyName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "branded": {
                          "type": "boolean"
                        },
                        "composition": {
                          "additionalProperties": false,
                          "properties": {
                            "context": {
                              "additionalProperties": false,
                              "properties": {
                                "clientId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "clientName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "period": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "periodStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "projectId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "qid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "timeRange": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "clientId",
                                "clientName",
                                "projectId",
                                "projectName",
                                "periodStart",
                                "periodEnd",
                                "period",
                                "timeRange",
                                "qid"
                              ],
                              "type": "object"
                            },
                            "invoiceNarratives": {
                              "additionalProperties": {
                                "maxLength": 20000,
                                "type": "string"
                              },
                              "propertyNames": {
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "ai": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "forensics": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "invoice": {
                                  "additionalProperties": {
                                    "additionalProperties": {
                                      "type": "boolean"
                                    },
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "layout": {
                              "additionalProperties": false,
                              "properties": {
                                "order": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "sections": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": {
                                        "type": "boolean"
                                      },
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "order",
                                "sections"
                              ],
                              "type": "object"
                            },
                            "narrative": {
                              "maxLength": 20000,
                              "type": "string"
                            },
                            "narrativeProvenance": {
                              "additionalProperties": false,
                              "properties": {
                                "modelId": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "outcome": {
                                  "enum": [
                                    "template",
                                    "generated"
                                  ],
                                  "type": "string"
                                },
                                "promptVersion": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "provider": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "openai",
                                        "anthropic"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "outcome",
                                "provider",
                                "modelId",
                                "promptVersion"
                              ],
                              "type": "object"
                            },
                            "tone": {
                              "enum": [
                                "default",
                                "executive",
                                "friendly",
                                "custom"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "context",
                            "layout",
                            "items",
                            "narrative",
                            "tone"
                          ],
                          "type": "object"
                        },
                        "facts": {
                          "additionalProperties": false,
                          "properties": {
                            "actions": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "action": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "n": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  },
                                  "tag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "tone": {
                                    "enum": [
                                      "amber",
                                      "blue",
                                      "neutral",
                                      "purple",
                                      "green"
                                    ],
                                    "type": "string"
                                  },
                                  "why": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "n",
                                  "tag",
                                  "tone",
                                  "title",
                                  "why",
                                  "action"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "ai": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "assistedPct": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "implementationHoursSaved": {
                                      "type": "number"
                                    },
                                    "netHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadPct": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "assistedPct",
                                    "implementationHoursSaved",
                                    "reviewOverheadHours",
                                    "netHours",
                                    "reviewOverheadPct"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "aiInsufficientSample": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "mergedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "taggedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "mergedChanges",
                                    "taggedChanges"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "assumptions": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "effectiveFrom": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "effectiveTo": {
                                    "anyOf": [
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "enum": [
                                      "cost-basis",
                                      "scope-baseline",
                                      "meeting-attribution",
                                      "ai-attribution",
                                      "reporting-period",
                                      "work-cost-allocation"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "default",
                                      "option",
                                      "manual",
                                      "date_range"
                                    ],
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "needs_verification",
                                      "confirmed",
                                      "rectified"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "unitOrMethod": {
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "value": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "versionId": {
                                    "anyOf": [
                                      {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "value",
                                  "unitOrMethod",
                                  "source",
                                  "status",
                                  "effectiveFrom",
                                  "effectiveTo",
                                  "versionId"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "confidence": {
                              "additionalProperties": false,
                              "properties": {
                                "hints": {
                                  "default": [],
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "label": {
                                  "default": "Not measured",
                                  "enum": [
                                    "High",
                                    "Medium",
                                    "Low",
                                    "Not measured"
                                  ],
                                  "type": "string"
                                },
                                "score": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "signals": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "evidence": {
                                        "additionalProperties": false,
                                        "default": {
                                          "denominator": null,
                                          "numerator": null,
                                          "query": "Evidence path was not recorded in this historical snapshot."
                                        },
                                        "properties": {
                                          "denominator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "numerator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "query": {
                                            "default": "Evidence path was not recorded in this historical snapshot.",
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "numerator",
                                          "denominator",
                                          "query"
                                        ],
                                        "type": "object"
                                      },
                                      "id": {
                                        "enum": [
                                          "prs_linked",
                                          "items_mapped",
                                          "meetings_tagged",
                                          "rate_card",
                                          "ai_tagging",
                                          "release_evidence",
                                          "manual_entry_share",
                                          "freshness",
                                          "assumptions"
                                        ],
                                        "type": "string"
                                      },
                                      "label": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "note": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "pct": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "weight": {
                                        "default": 1,
                                        "exclusiveMinimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "pct",
                                      "weight",
                                      "contribution",
                                      "evidence",
                                      "note"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "score",
                                "label",
                                "signals",
                                "hints"
                              ],
                              "type": "object"
                            },
                            "coordination": {
                              "additionalProperties": false,
                              "properties": {
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "declined": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "hours": {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "meetings": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "taggingPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "meetings",
                                "hours",
                                "declined",
                                "costCents",
                                "blendedHourlyRateCents",
                                "taggingPct"
                              ],
                              "type": "object"
                            },
                            "currency": {
                              "anyOf": [
                                {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "delivery": {
                              "additionalProperties": false,
                              "properties": {
                                "completedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "mergedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "milestones": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesCompleted": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesTotal": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "prsLinkedPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "releaseRows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "items": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "name": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "releasedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "releaseId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "releaseId",
                                      "name",
                                      "releasedAt",
                                      "items"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "releases": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "rows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "completedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "externalKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "linkedChanges": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "title": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "type": {
                                        "enum": [
                                          "epic",
                                          "story",
                                          "task",
                                          "bug",
                                          "subtask",
                                          "other"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "anyOf": [
                                          {
                                            "format": "uri",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "workItemId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "workItemId",
                                      "title",
                                      "externalKey",
                                      "type",
                                      "linkedChanges",
                                      "completedAt",
                                      "url"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "completedItems",
                                "mergedChanges",
                                "releases",
                                "milestones",
                                "objectivesTotal",
                                "objectivesCompleted",
                                "prsLinkedPct",
                                "rows",
                                "releaseRows"
                              ],
                              "type": "object"
                            },
                            "evidencePackages": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "caseId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "contentHash": {
                                    "type": "string"
                                  },
                                  "createdAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "memo",
                                      "cr",
                                      "qbr"
                                    ],
                                    "type": "string"
                                  },
                                  "snapshot": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "case": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "agencyName": {
                                            "type": "string"
                                          },
                                          "clientName": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "confidence": {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "periodEnd": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "periodLabel": {
                                            "type": "string"
                                          },
                                          "periodStart": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "projectName": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "enum": [
                                              "Open",
                                              "Investigating",
                                              "Evidence gathered",
                                              "Disposition",
                                              "Resolved",
                                              "Filed"
                                            ],
                                            "type": "string"
                                          },
                                          "subtitle": {
                                            "type": "string"
                                          },
                                          "title": {
                                            "type": "string"
                                          },
                                          "typology": {
                                            "anyOf": [
                                              {
                                                "enum": [
                                                  "expansion",
                                                  "acdrift",
                                                  "rework",
                                                  "untraced",
                                                  "cost"
                                                ],
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "title",
                                          "subtitle",
                                          "status",
                                          "typology",
                                          "periodStart",
                                          "periodEnd",
                                          "periodLabel",
                                          "clientName",
                                          "projectName",
                                          "agencyName",
                                          "confidence"
                                        ],
                                        "type": "object"
                                      },
                                      "claims": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "id": {
                                              "minLength": 1,
                                              "type": "string"
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "text": {
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "text",
                                            "nodeIds",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "custody": {
                                        "additionalProperties": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "id": {
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "kind": {
                                                "enum": [
                                                  "jira",
                                                  "pr",
                                                  "release",
                                                  "meeting",
                                                  "note"
                                                ],
                                                "type": "string"
                                              },
                                              "meta": {
                                                "type": "string"
                                              },
                                              "t": {
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "id",
                                              "t",
                                              "meta"
                                            ],
                                            "type": "object"
                                          },
                                          "type": "array"
                                        },
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "draft": {
                                        "type": "boolean"
                                      },
                                      "engine": {
                                        "enum": [
                                          "template",
                                          "claude"
                                        ],
                                        "type": "string"
                                      },
                                      "flags": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "detail": {
                                              "type": "string"
                                            },
                                            "disposition": {
                                              "anyOf": [
                                                {
                                                  "enum": [
                                                    "inscope",
                                                    "cr",
                                                    "billable",
                                                    "writeoff",
                                                    "decision"
                                                  ],
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "dispositionLabel": {
                                              "type": "string"
                                            },
                                            "evidenceMissing": {
                                              "type": "boolean"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "impact": {
                                              "type": "string"
                                            },
                                            "impactCents": {
                                              "anyOf": [
                                                {
                                                  "maximum": 9007199254740991,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "rationale": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "resolvedAt": {
                                              "anyOf": [
                                                {
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "severity": {
                                              "enum": [
                                                "amber",
                                                "red"
                                              ],
                                              "type": "string"
                                            },
                                            "signalKey": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "type": "string"
                                            },
                                            "typology": {
                                              "enum": [
                                                "added-after-lock",
                                                "reopened-from",
                                                "estimate-growth",
                                                "meeting-overrun",
                                                "untraced"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "signalKey",
                                            "typology",
                                            "severity",
                                            "title",
                                            "detail",
                                            "impact",
                                            "impactCents",
                                            "nodeIds",
                                            "disposition",
                                            "dispositionLabel",
                                            "rationale",
                                            "resolvedAt",
                                            "evidenceMissing",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "generatedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "memo",
                                          "cr",
                                          "qbr"
                                        ],
                                        "type": "string"
                                      },
                                      "notes": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "at": {
                                              "format": "date-time",
                                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                              "type": "string"
                                            },
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "authorName": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "body": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "targetNodeId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "authorName",
                                            "at",
                                            "targetNodeId",
                                            "body",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "prose": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "sections": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "body": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                },
                                                "heading": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "heading",
                                                "body"
                                              ],
                                              "type": "object"
                                            },
                                            "type": "array"
                                          },
                                          "summary": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "title": {
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "title",
                                          "summary",
                                          "sections"
                                        ],
                                        "type": "object"
                                      },
                                      "provenance": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphBuild": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "graphHash": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "id": {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                    "type": "string"
                                                  },
                                                  "profile": {
                                                    "type": "string"
                                                  },
                                                  "rulesVersion": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "graphHash",
                                                  "rulesVersion",
                                                  "profile"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "lock": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "approvalRef": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "authority": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "effectiveAt": {
                                                    "format": "date-time",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                                    "type": "string"
                                                  },
                                                  "lockedOn": {
                                                    "format": "date",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                    "type": "string"
                                                  },
                                                  "lockId": {
                                                    "anyOf": [
                                                      {
                                                        "format": "uuid",
                                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "memberCount": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 0,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "provenance": {
                                                    "enum": [
                                                      "explicit",
                                                      "register_scope_lock_date",
                                                      "engagement_starts_on"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "reconstructed": {
                                                    "type": "boolean"
                                                  },
                                                  "resolverVersion": {
                                                    "type": "string"
                                                  },
                                                  "timeZone": {
                                                    "type": "string"
                                                  },
                                                  "version": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 1,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "lockId",
                                                  "version",
                                                  "lockedOn",
                                                  "effectiveAt",
                                                  "timeZone",
                                                  "provenance",
                                                  "reconstructed",
                                                  "authority",
                                                  "approvalRef",
                                                  "memberCount",
                                                  "resolverVersion"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lock",
                                          "graphBuild"
                                        ],
                                        "type": "object"
                                      },
                                      "version": {
                                        "const": 1,
                                        "type": "number"
                                      },
                                      "watermark": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "version",
                                      "kind",
                                      "draft",
                                      "watermark",
                                      "case",
                                      "flags",
                                      "notes",
                                      "custody",
                                      "claims",
                                      "prose",
                                      "engine",
                                      "generatedAt"
                                    ],
                                    "type": "object"
                                  },
                                  "status": {
                                    "enum": [
                                      "draft",
                                      "final"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "caseId",
                                  "kind",
                                  "status",
                                  "contentHash",
                                  "createdAt",
                                  "snapshot"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "investment": {
                              "additionalProperties": false,
                              "properties": {
                                "cloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "coordinationCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "coordinationPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costEvidence": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "cloudLines": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "linkedTimeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "timeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        }
                                      },
                                      "required": [
                                        "timeEntries",
                                        "linkedTimeEntries",
                                        "cloudLines"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "currencyConflict": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimated": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimatedCloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "invoicedCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCategories": {
                                  "anyOf": [
                                    {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "category": {
                                            "enum": [
                                              "feature",
                                              "bug",
                                              "other_linked",
                                              "unlinked"
                                            ],
                                            "type": "string"
                                          },
                                          "cents": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "hours": {
                                            "minimum": 0,
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "category",
                                          "cents",
                                          "hours"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "reworkCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reworkPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "roleBandHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "scopeCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "scopePct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "totalCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unpricedHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "totalCents",
                                "labourCents",
                                "labourHours",
                                "unpricedHours",
                                "roleBandHours",
                                "cloudCents",
                                "estimatedCloudCents",
                                "estimated",
                                "invoicedCents",
                                "coordinationCents",
                                "coordinationPct",
                                "scopeCents",
                                "scopePct",
                                "reworkCents",
                                "reworkPct",
                                "labourCategories",
                                "currencyConflict",
                                "costEvidence"
                              ],
                              "type": "object"
                            },
                            "manualEntrySharePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "periodEnd": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "periodStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "scope": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "addedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "addedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "blendedHourlyRateCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "grownCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "grownItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "priced": {
                                      "type": "boolean"
                                    },
                                    "reopenedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "reopenedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "scopeLockOn": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "totalCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "scopeLockOn",
                                    "totalCents",
                                    "priced",
                                    "addedItems",
                                    "addedCents",
                                    "reopenedItems",
                                    "reopenedCents",
                                    "grownItems",
                                    "grownCents",
                                    "unestimated",
                                    "blendedHourlyRateCents"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sources": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "projectRows": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "reason": {
                                    "enum": [
                                      "no_activity",
                                      "unattributed",
                                      "empty"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "commercial",
                                      "tracker",
                                      "code",
                                      "release",
                                      "calendar"
                                    ],
                                    "type": "string"
                                  },
                                  "state": {
                                    "enum": [
                                      "data_present",
                                      "not_connected",
                                      "no_data"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source",
                                  "state",
                                  "label"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "periodStart",
                            "periodEnd",
                            "currency",
                            "delivery",
                            "investment",
                            "scope",
                            "coordination",
                            "ai",
                            "aiInsufficientSample",
                            "confidence",
                            "sources",
                            "manualEntrySharePct",
                            "assumptions",
                            "actions",
                            "evidencePackages"
                          ],
                          "type": "object"
                        },
                        "generatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "teamType": {
                          "anyOf": [
                            {
                              "enum": [
                                "agency",
                                "inhouse",
                                "external"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "const": 1,
                          "type": "number"
                        }
                      },
                      "required": [
                        "version",
                        "agencyName",
                        "composition",
                        "facts",
                        "branded",
                        "generatedAt"
                      ],
                      "type": "object"
                    },
                    "report": {
                      "additionalProperties": false,
                      "properties": {
                        "context": {
                          "additionalProperties": false,
                          "properties": {
                            "clientId": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "clientName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "period": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "periodEnd": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "periodStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "projectId": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "projectName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "qid": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "timeRange": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "clientId",
                            "clientName",
                            "projectId",
                            "projectName",
                            "periodStart",
                            "periodEnd",
                            "period",
                            "timeRange",
                            "qid"
                          ],
                          "type": "object"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "lastSharedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "snapshotId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "draft",
                            "shipped"
                          ],
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "status",
                        "context",
                        "snapshotId",
                        "lastSharedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "report",
                    "document"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Freeze a report snapshot",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.create",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder/{id}": {
      "get": {
        "description": "Retrieve the existing report current immutable snapshot, stored document and rendered HTML. GET never rereads live facts or regenerates narrative. Optional one client/project selection must match the report. Historical snapshots and existing app/share behavior remain unchanged. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "document": {
                        "agencyName": "Example report workspace",
                        "branded": false,
                        "composition": {
                          "context": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "clientName": "example-reports Retail",
                            "period": "Q1 2026",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "projectName": "example-reports Checkout Replatform",
                            "qid": null,
                            "timeRange": "Jan 1–Mar 31"
                          },
                          "items": {},
                          "layout": {
                            "order": [
                              "rs1",
                              "rs2",
                              "rs3",
                              "rs4",
                              "rs5",
                              "rs6",
                              "rs7",
                              "rs8",
                              "rs9",
                              "rs10"
                            ],
                            "sections": {
                              "rs1": true,
                              "rs10": true,
                              "rs2": true,
                              "rs3": true,
                              "rs4": true,
                              "rs5": true,
                              "rs6": true,
                              "rs7": false,
                              "rs8": true,
                              "rs9": true
                            }
                          },
                          "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                          "narrativeProvenance": {
                            "modelId": null,
                            "outcome": "template",
                            "promptVersion": null,
                            "provider": null
                          },
                          "tone": "default"
                        },
                        "facts": {
                          "actions": [
                            {
                              "action": "Review added items with the client and formalize the next-cycle scope.",
                              "n": 1,
                              "tag": "Margin",
                              "title": "Convert scope expansion into a change request",
                              "tone": "amber",
                              "why": "$6,600 of estimated delivery investment came from work added after scope lock."
                            },
                            {
                              "action": "Create a dedicated discovery / clarification budget bucket.",
                              "n": 2,
                              "tag": "Process",
                              "title": "Separate discovery from implementation budget",
                              "tone": "blue",
                              "why": "1 meetings (1 h) were attributed to this project."
                            },
                            {
                              "action": "Require ticket IDs in branch names and PR titles.",
                              "n": 3,
                              "tag": "Data",
                              "title": "Improve ticket-to-PR traceability",
                              "tone": "neutral",
                              "why": "0% of PRs were not linked to tickets."
                            },
                            {
                              "action": "Add an AI-assisted field or label to relevant work items.",
                              "n": 4,
                              "tag": "AI",
                              "title": "Track AI-assisted work explicitly",
                              "tone": "purple",
                              "why": "AI-assisted delivery cannot be measured until assisted work is tagged."
                            },
                            {
                              "action": "Use the executive summary and scope expansion sections in the next QBR or invoice discussion.",
                              "n": 5,
                              "tag": "Client",
                              "title": "Use this report in the next client review",
                              "tone": "green",
                              "why": "The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions."
                            }
                          ],
                          "ai": null,
                          "aiInsufficientSample": null,
                          "assumptions": [
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "cost-basis",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Cost estimate basis",
                              "unitOrMethod": "person_then_role",
                              "value": "$150/h",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "scope-baseline",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Scope baseline",
                              "unitOrMethod": "engagement_start",
                              "value": "1 work items",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "meeting-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Meeting attribution",
                              "unitOrMethod": "project_tagged",
                              "value": "100% tagged",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "ai-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "AI attribution",
                              "unitOrMethod": "self_reported",
                              "value": "Self-reported labels and trailers",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "reporting-period",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Reporting period",
                              "unitOrMethod": "active_range",
                              "value": "Jan 1 – Mar 31, 2026",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "work-cost-allocation",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Work-item cost allocation",
                              "unitOrMethod": "not_allocated",
                              "value": "Team estimate only",
                              "versionId": null
                            }
                          ],
                          "confidence": {
                            "hints": [
                              "Tag calendar events with the client or project.",
                              "Add person-level rates for worked hours; role rates remain partial.",
                              "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                              "Reconnect or sync sources so their latest successful data is current.",
                              "Confirm or rectify the reporting assumptions used for this period.",
                              "Connect deployment evidence to completed work items."
                            ],
                            "label": "Medium",
                            "score": 80,
                            "signals": [
                              {
                                "contribution": 29.63,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 2,
                                  "query": "Merged code changes linked to normalized work items in the report period."
                                },
                                "id": "prs_linked",
                                "label": "PRs linked to tickets",
                                "note": "Linked merged changes",
                                "pct": 100,
                                "weight": 16
                              },
                              {
                                "contribution": 25.93,
                                "evidence": {
                                  "denominator": 3,
                                  "numerator": 3,
                                  "query": "Workspace work items in the report period with a normalized project mapping."
                                },
                                "id": "items_mapped",
                                "label": "Tickets mapped to client / project",
                                "note": "Workspace mapping coverage",
                                "pct": 100,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "An active Google Calendar connection is required before calendar tagging is measured."
                                },
                                "id": "meetings_tagged",
                                "label": "Meetings tagged to client / project",
                                "note": "No active calendar source",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                                },
                                "id": "rate_card",
                                "label": "Rate card precision",
                                "note": "No labour hours in this period",
                                "pct": null,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                                },
                                "id": "ai_tagging",
                                "label": "AI-assisted work tagging",
                                "note": "Not tagged",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": 9.26,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 1,
                                  "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                                },
                                "id": "release_evidence",
                                "label": "Release / deployment evidence",
                                "note": "Completed work with linked release evidence",
                                "pct": 50,
                                "weight": 10
                              },
                              {
                                "contribution": 14.81,
                                "evidence": {
                                  "denominator": 100,
                                  "numerator": 100,
                                  "query": "Synced rather than manual or CSV evidence rows in the report context."
                                },
                                "id": "manual_entry_share",
                                "label": "Synced evidence share",
                                "note": "Synced evidence coverage",
                                "pct": 100,
                                "weight": 8
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Latest successful sync per active connection, measured against the report period end."
                                },
                                "id": "freshness",
                                "label": "Source freshness",
                                "note": "No active sources",
                                "pct": null,
                                "weight": 8
                              },
                              {
                                "contribution": 0,
                                "evidence": {
                                  "denominator": 6,
                                  "numerator": 0,
                                  "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                                },
                                "id": "assumptions",
                                "label": "Confirmed reporting assumptions",
                                "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                                "pct": 0,
                                "weight": 6
                              }
                            ]
                          },
                          "coordination": {
                            "blendedHourlyRateCents": 15000,
                            "costCents": 15000,
                            "declined": 0,
                            "hours": 1,
                            "meetings": 1,
                            "taggingPct": 100
                          },
                          "currency": "USD",
                          "delivery": {
                            "completedItems": 2,
                            "mergedChanges": 2,
                            "milestones": 0,
                            "objectivesCompleted": 0,
                            "objectivesTotal": 0,
                            "prsLinkedPct": 100,
                            "releaseRows": [
                              {
                                "items": 1,
                                "name": "v1.4.0",
                                "releasedAt": "2026-02-12T18:00:00.000Z",
                                "releaseId": "00000000-0000-4000-8000-000000000007"
                              }
                            ],
                            "releases": 1,
                            "rows": [
                              {
                                "completedAt": "2026-03-01T10:00:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-42",
                                "linkedChanges": 1,
                                "title": "Refunds fail for split tender",
                                "type": "bug",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000005"
                              },
                              {
                                "completedAt": "2026-02-10T16:30:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-1",
                                "linkedChanges": 1,
                                "title": "Card vault migration",
                                "type": "story",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000006"
                              }
                            ]
                          },
                          "evidencePackages": [],
                          "investment": {
                            "cloudCents": 0,
                            "coordinationCents": 15000,
                            "coordinationPct": null,
                            "costEvidence": {
                              "cloudLines": 0,
                              "linkedTimeEntries": 0,
                              "timeEntries": 0
                            },
                            "currencyConflict": false,
                            "estimated": false,
                            "estimatedCloudCents": 0,
                            "invoicedCents": null,
                            "labourCategories": [],
                            "labourCents": 0,
                            "labourHours": 0,
                            "reworkCents": 0,
                            "reworkPct": null,
                            "roleBandHours": 0,
                            "scopeCents": 660000,
                            "scopePct": null,
                            "totalCents": null,
                            "unpricedHours": 0
                          },
                          "manualEntrySharePct": 0,
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "scope": {
                            "addedCents": 660000,
                            "addedItems": 2,
                            "blendedHourlyRateCents": 15000,
                            "grownCents": 0,
                            "grownItems": 0,
                            "priced": true,
                            "reopenedCents": 0,
                            "reopenedItems": 0,
                            "scopeLockOn": "2026-01-01",
                            "totalCents": 660000,
                            "unestimated": 0
                          },
                          "sources": [
                            {
                              "label": "Contracts",
                              "source": "commercial",
                              "state": "data_present"
                            },
                            {
                              "label": "Tracker",
                              "source": "tracker",
                              "state": "data_present"
                            },
                            {
                              "label": "Code",
                              "source": "code",
                              "state": "data_present"
                            },
                            {
                              "label": "Releases",
                              "source": "release",
                              "state": "data_present"
                            },
                            {
                              "label": "Calendar",
                              "source": "calendar",
                              "state": "data_present"
                            }
                          ]
                        },
                        "generatedAt": "2026-10-01T08:30:28.683Z",
                        "teamType": null,
                        "version": 1
                      },
                      "html": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<title>example-reports Retail — example-reports Checkout Replatform · Q1 2026</title>\n<meta name=\"scopeworth:question-category\" content=\"Invoice\" />\n<style>\n  :root{\n    --navy:#0F172A; --charcoal:#1E293B; --bg:#F8FAFC; --card:#FFFFFF; --border:#E2E8F0;\n    --muted:#64748B; --slate:#CBD5E1; --blue:#2563EB; --teal:#14B8A6; --green:#10B981;\n    --amber:#F59E0B; --red:#EF4444; --ink:#0F172A; --subtle:#F1F5F9;\n  }\n  *{box-sizing:border-box}\n  html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);}\n  body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased;font-feature-settings:\"ss01\",\"cv11\";}\n  .num{font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\"}\n  .mono{font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace}\n  .report{max-width:840px;margin:0 auto;padding:24px 16px 80px;}\n  .report-page{background:var(--card);border:1px solid var(--border);border-radius:14px;margin-bottom:28px;padding:56px 64px;box-shadow:0 1px 0 rgba(15,23,42,0.02), 0 8px 24px -16px rgba(15,23,42,0.10);position:relative;overflow:hidden;}\n  .page-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;margin-bottom:32px;border-bottom:1px solid var(--border);font-size:11px;color:var(--muted);letter-spacing:0.06em;text-transform:uppercase;font-weight:500;}\n  .page-header .brand{display:flex;align-items:center;gap:8px;color:var(--ink);font-weight:600;letter-spacing:0.02em;text-transform:none;font-size:12px}\n  .page-header .brand svg{height:22.5px;width:auto;display:block}\n  .page-header .crumb{display:flex;gap:10px;align-items:center}\n  .page-header .crumb .dot{width:3px;height:3px;border-radius:50%;background:var(--slate)}\n  .page-num{font-variant-numeric:tabular-nums}\n  .logo-wordmark{height:26px;width:auto;display:block}\n  h1,h2,h3,h4{margin:0;color:var(--ink);letter-spacing:-0.01em}\n  h1{font-size:34px;font-weight:700;line-height:1.15;letter-spacing:-0.02em}\n  h2{font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-0.015em}\n  h3{font-size:16px;font-weight:600}\n  h4{font-size:13px;font-weight:600;color:var(--charcoal)}\n  p{margin:0 0 12px}\n  .eyebrow{font-size:11px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--blue);}\n  .muted{color:var(--muted)}\n  .lead{font-size:15px;line-height:1.65;color:var(--charcoal)}\n  .section-title{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px;}\n  .section-title h2{flex:1}\n  .section-title .meta{font-size:12px;color:var(--muted);white-space:nowrap}\n  .grid{display:grid;gap:16px}\n  .grid-2{grid-template-columns:repeat(2,1fr)}\n  .grid-3{grid-template-columns:repeat(3,1fr)}\n  .grid-4{grid-template-columns:repeat(4,1fr)}\n  .card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:20px;}\n  .card.tight{padding:16px}\n  .card .label{font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}\n  .card .value{font-size:28px;font-weight:700;line-height:1.1;letter-spacing:-0.02em}\n  .card .sub{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}\n  .kpi{border:1px solid var(--border);border-radius:10px;padding:18px;background:var(--card);position:relative;}\n  .kpi .label{font-size:11px;letter-spacing:0.1em;text-transform:uppercase;font-weight:600;color:var(--muted);margin-bottom:10px}\n  .kpi .value{font-size:30px;font-weight:700;letter-spacing:-0.02em;line-height:1}\n  .kpi .value .unit{font-size:16px;font-weight:600;color:var(--muted);margin-left:4px}\n  .kpi ul{margin:14px 0 0;padding:0;list-style:none;border-top:1px dashed var(--border);padding-top:12px}\n  .kpi ul li{display:flex;justify-content:space-between;font-size:12px;color:var(--charcoal);padding:3px 0}\n  .kpi ul li .v{font-weight:600;font-variant-numeric:tabular-nums}\n  .kpi.accent-blue{box-shadow:inset 3px 0 0 var(--blue)}\n  .kpi.accent-teal{box-shadow:inset 3px 0 0 var(--teal)}\n  .kpi.accent-amber{box-shadow:inset 3px 0 0 var(--amber)}\n  .kpi.accent-green{box-shadow:inset 3px 0 0 var(--green)}\n  .kpi.accent-red{box-shadow:inset 3px 0 0 var(--red)}\n  .chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:500;background:var(--subtle);color:var(--charcoal);border:1px solid var(--border);}\n  .chip .dot{width:6px;height:6px;border-radius:50%;background:var(--slate)}\n  .chip.green{background:rgba(16,185,129,.08);color:#047857;border-color:rgba(16,185,129,.25)}\n  .chip.green .dot{background:var(--green)}\n  .chip.amber{background:rgba(245,158,11,.08);color:#92400e;border-color:rgba(245,158,11,.25)}\n  .chip.amber .dot{background:var(--amber)}\n  .chip.red{background:rgba(239,68,68,.08);color:#991b1b;border-color:rgba(239,68,68,.25)}\n  .chip.red .dot{background:var(--red)}\n  .chip.blue{background:rgba(37,99,235,.08);color:#1d4ed8;border-color:rgba(37,99,235,.25)}\n  .chip.blue .dot{background:var(--blue)}\n  table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;border:1px solid var(--border);border-radius:10px;overflow:hidden;}\n  thead th{background:var(--subtle);text-align:left;font-weight:600;font-size:11px;letter-spacing:0.08em;text-transform:uppercase;color:var(--muted);padding:10px 14px;border-bottom:1px solid var(--border);}\n  tbody td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:top;}\n  tbody tr:last-child td{border-bottom:none}\n  td.num, th.num{text-align:right;font-variant-numeric:tabular-nums}\n  td .row-title{font-weight:600;color:var(--ink)}\n  td .row-sub{color:var(--muted);font-size:12px;margin-top:2px}\n  .callout{background:linear-gradient(180deg,#F8FAFF 0%, #F1F5F9 100%);border:1px solid var(--border);border-left:3px solid var(--blue);padding:16px 18px;border-radius:8px;font-size:13px;color:var(--charcoal);}\n  .callout strong{color:var(--ink)}\n  .callout.amber{border-left-color:var(--amber);background:linear-gradient(180deg,#FFFBF1 0%, #FEF3C7 5%, #FFFBEB 100%)}\n  .callout.green{border-left-color:var(--green);background:linear-gradient(180deg,#F0FDF7 0%, #ECFDF5 100%)}\n  .bar-row{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:10px}\n  .bar-track{position:relative;height:10px;border-radius:6px;background:var(--subtle);overflow:hidden;border:1px solid var(--border);}\n  .bar-fill{position:absolute;inset:0 auto 0 0;background:var(--blue);border-radius:6px}\n  .bar-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--charcoal)}\n  .bar-meta .name{font-weight:500}\n  .bar-meta .v{font-variant-numeric:tabular-nums;color:var(--muted)}\n  .stack{display:flex;height:14px;border-radius:8px;overflow:hidden;border:1px solid var(--border);background:var(--subtle);}\n  .stack > div{height:100%}\n  .stack-legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:14px}\n  .stack-legend .item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--charcoal)}\n  .stack-legend .sw{width:10px;height:10px;border-radius:3px}\n  .cover{padding:0;overflow:hidden;border:1px solid var(--border);}\n  .cover-inner{background:radial-gradient(1200px 500px at 110% -10%, rgba(37,99,235,.35), transparent 55%),radial-gradient(900px 400px at -10% 110%, rgba(20,184,166,.22), transparent 55%),linear-gradient(180deg,#0B1224 0%,#0F172A 60%,#0B1020 100%);color:#E2E8F0;padding:64px 64px 56px;min-height:980px;display:flex;flex-direction:column;justify-content:space-between;position:relative;}\n  .cover-top{display:flex;align-items:center;justify-content:space-between;color:#CBD5E1;position:relative;z-index:1}\n  .cover-top .brand{display:flex;align-items:center;gap:10px;font-weight:600;letter-spacing:0.04em;color:#F8FAFC}\n  .cover-top .brand svg{height:30px;width:auto}\n  .cover-meta{font-size:11px;letter-spacing:0.14em;text-transform:uppercase;color:#94A3B8}\n  .cover-headline{margin-top:48px;max-width:560px;position:relative;z-index:1}\n  .cover-headline .eyebrow{color:#7DD3FC;font-weight:600}\n  .cover-headline h1{color:#F8FAFC;font-size:54px;line-height:1.05;letter-spacing:-0.025em;margin:14px 0 16px;font-weight:700;}\n  .cover-headline .tag{color:#CBD5E1;font-size:18px;line-height:1.5;max-width:520px}\n  .cover-graphic{position:absolute;right:-60px;top:200px;width:440px;height:480px;opacity:.55;pointer-events:none;z-index:0;}\n  .cover-meta-grid{margin-top:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:24px;padding-top:36px;border-top:1px solid rgba(203,213,225,.18);position:relative;z-index:1;}\n  .cover-meta-grid .m-label{font-size:10px;letter-spacing:0.16em;text-transform:uppercase;color:#94A3B8;margin-bottom:6px}\n  .cover-meta-grid .m-value{font-size:14px;color:#F8FAFC;font-weight:500;line-height:1.4}\n  .cover-footer{display:flex;justify-content:space-between;align-items:center;margin-top:28px;font-size:11px;color:#94A3B8;position:relative;z-index:1;}\n  .cover-note{font-size:11px;color:#94A3B8;max-width:420px;line-height:1.5;}\n  .integration-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}\n  .int-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:rgba(248,250,252,.06);border:1px solid rgba(203,213,225,.18);color:#E2E8F0;font-size:11px;font-weight:500;}\n  .int-badge .b-dot{width:6px;height:6px;border-radius:50%;background:#7DD3FC}\n  .equation{display:flex;align-items:center;justify-content:center;gap:16px;padding:22px;background:var(--subtle);border:1px solid var(--border);border-radius:10px;font-variant-numeric:tabular-nums;}\n  .eq-num{font-size:28px;font-weight:700;color:var(--ink);letter-spacing:-0.02em}\n  .eq-op{font-size:22px;color:var(--muted);font-weight:500}\n  .eq-label{font-size:11px;color:var(--muted);letter-spacing:0.08em;text-transform:uppercase;font-weight:600;margin-top:4px;text-align:center}\n  .eq-cell{display:flex;flex-direction:column;align-items:center;min-width:120px}\n  .eq-cell.gain .eq-num{color:#047857}\n  .conf-head{display:flex;align-items:center;gap:18px;margin-bottom:18px}\n  .conf-ring{width:96px;height:96px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;position:relative;}\n  .conf-ring::after{content:\"\";position:absolute;inset:8px;background:var(--card);border-radius:50%;}\n  .conf-ring .v{position:relative;z-index:1;font-size:20px;font-weight:700;letter-spacing:-0.02em}\n  .conf-ring .v small{font-size:11px;font-weight:500;color:var(--muted);display:block;text-align:center;letter-spacing:0.08em;text-transform:uppercase}\n  .rec-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}\n  .rec-card{border:1px solid var(--border);border-radius:10px;padding:18px;background:var(--card);display:flex;flex-direction:column;gap:8px;}\n  .rec-card .rc-num{width:24px;height:24px;border-radius:6px;background:var(--ink);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;}\n  .rec-card h4{font-size:14px}\n  .rec-card .rc-row{font-size:12px;color:var(--charcoal)}\n  .rec-card .rc-row b{color:var(--muted);font-weight:600;letter-spacing:0.06em;text-transform:uppercase;font-size:10px;display:block;margin-bottom:2px}\n  .footer-strip{display:flex;justify-content:space-between;align-items:end;padding-top:24px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);}\n  .footer-strip .links{display:flex;gap:14px}\n  .made-with{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 auto;padding:14px 18px;max-width:840px;font-size:12px;color:var(--muted);letter-spacing:0.04em}\n  .made-with svg{height:18px;width:auto}\n  .mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}\n  .mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}\n  .mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}\n  .page-label{position:absolute;top:18px;right:24px;font-size:10px;letter-spacing:0.14em;text-transform:uppercase;color:var(--muted);font-weight:500;}\n  @media (max-width:780px){\n    .report-page{padding:36px 24px}\n    .grid-4{grid-template-columns:repeat(2,1fr)}\n    .grid-3{grid-template-columns:1fr}\n    .rec-grid{grid-template-columns:1fr}\n    .cover-inner{padding:36px 28px;min-height:auto}\n    .cover-headline h1{font-size:36px}\n    .cover-meta-grid{grid-template-columns:repeat(2,1fr)}\n    .cover-graphic{display:none}\n  }\n  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }\n  @media print{\n    @page { size: A4; margin: 14mm 14mm 16mm; }\n    @page :first { margin: 0; }\n    *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }\n    html,body{background:#fff}\n    .report{max-width:none;margin:0;padding:0}\n    .report-page{border:none;border-radius:0;box-shadow:none;margin:0;padding:0 0 12mm;page-break-after:always;break-after:page;}\n    .report-page:last-child{page-break-after:auto}\n    .cover{padding:0;background:#0F172A;overflow:hidden}\n    .cover-inner{min-height:auto;padding:32mm 18mm 28mm}\n    .avoid-break, .kpi, .card, table, .callout, .rec-card, .equation, .conf-head{break-inside:avoid;page-break-inside:avoid;}\n    h2,h3{break-after:avoid;page-break-after:avoid}\n    a{color:var(--ink);text-decoration:none}\n    .page-label{display:none}\n  }\n</style>\n</head>\n<body>\n<main class=\"report\" role=\"main\">\n<section class=\"report-page cover\" aria-labelledby=\"cover-title\"><div class=\"cover-inner\">\n    <header class=\"cover-top\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#F8FAFC\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#F8FAFC\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#60A5FA\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#2DD4BF\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#F8FAFC\">Scopeworth</text></svg></div><div class=\"cover-meta num\">Q1 2026 · Client report</div></header>\n    <svg class=\"cover-graphic\" viewBox=\"0 0 520 560\" aria-hidden=\"true\"><defs><linearGradient id=\"paper\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#1E293B\" stop-opacity=\".95\"/><stop offset=\"1\" stop-color=\"#0F172A\" stop-opacity=\".7\"/></linearGradient><linearGradient id=\"line\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"0\"><stop offset=\"0\" stop-color=\"#7DD3FC\" stop-opacity=\"0\"/><stop offset=\".5\" stop-color=\"#7DD3FC\" stop-opacity=\".9\"/><stop offset=\"1\" stop-color=\"#5EEAD4\" stop-opacity=\"0\"/></linearGradient></defs><g transform=\"translate(120 60) rotate(-6)\"><rect width=\"320\" height=\"420\" rx=\"14\" fill=\"url(#paper)\" stroke=\"rgba(125,211,252,.18)\"/><rect x=\"24\" y=\"28\" width=\"120\" height=\"10\" rx=\"2\" fill=\"#7DD3FC\" opacity=\".8\"/><rect x=\"24\" y=\"48\" width=\"220\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".5\"/><rect x=\"24\" y=\"60\" width=\"180\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".5\"/><rect x=\"24\" y=\"92\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(37,99,235,.18)\" stroke=\"rgba(125,211,252,.25)\"/><rect x=\"24\" y=\"186\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(20,184,166,.14)\" stroke=\"rgba(94,234,212,.25)\"/><rect x=\"24\" y=\"280\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(245,158,11,.10)\" stroke=\"rgba(245,158,11,.25)\"/></g><g transform=\"translate(80 110) rotate(-2)\"><rect width=\"320\" height=\"420\" rx=\"14\" fill=\"url(#paper)\" stroke=\"rgba(125,211,252,.22)\"/><rect x=\"24\" y=\"28\" width=\"160\" height=\"12\" rx=\"3\" fill=\"#F8FAFC\" opacity=\".95\"/><rect x=\"24\" y=\"50\" width=\"240\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".55\"/><g transform=\"translate(24 90)\"><rect width=\"272\" height=\"120\" rx=\"8\" fill=\"rgba(15,23,42,.6)\" stroke=\"rgba(125,211,252,.18)\"/><polyline points=\"14,90 50,72 86,80 122,52 158,60 194,38 230,46 258,28\" fill=\"none\" stroke=\"url(#line)\" stroke-width=\"2\"/><polyline points=\"14,100 50,92 86,96 122,84 158,88 194,76 230,80 258,70\" fill=\"none\" stroke=\"#5EEAD4\" stroke-opacity=\".55\" stroke-width=\"1.5\" stroke-dasharray=\"3 3\"/><g fill=\"#7DD3FC\"><circle cx=\"50\" cy=\"72\" r=\"2.5\"/><circle cx=\"122\" cy=\"52\" r=\"2.5\"/><circle cx=\"194\" cy=\"38\" r=\"2.5\"/><circle cx=\"258\" cy=\"28\" r=\"2.5\"/></g></g><g transform=\"translate(24 230)\"><rect width=\"272\" height=\"14\" rx=\"4\" fill=\"rgba(255,255,255,.08)\"/><rect width=\"174\" height=\"14\" rx=\"4\" fill=\"#2563EB\" opacity=\".85\"/><rect x=\"174\" width=\"26\" height=\"14\" fill=\"#14B8A6\" opacity=\".85\"/><rect x=\"200\" width=\"22\" height=\"14\" fill=\"#F59E0B\" opacity=\".85\"/><rect x=\"222\" width=\"36\" height=\"14\" rx=\"0\" fill=\"#EF4444\" opacity=\".55\"/><rect x=\"258\" width=\"14\" height=\"14\" rx=\"0\" fill=\"#94A3B8\" opacity=\".5\"/></g></g></svg>\n    <div class=\"cover-headline\"><div class=\"eyebrow\">Client SDLC ROI Report</div><h1 id=\"cover-title\">What changed,<br/>what shipped,<br/>and what it cost.</h1><p class=\"tag\">A client-ready summary of delivery value, scope movement, rework, coordination, and AI-assisted delivery economics — built from the signals already flowing through your tools.</p><div class=\"integration-row mt-24\"><span class=\"int-badge\"><span class=\"b-dot\"></span>Contracts</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Tracker</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Code</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Releases</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Calendar</span></div></div>\n    <div class=\"cover-meta-grid\">\n      <div><div class=\"m-label\">Prepared by</div><div class=\"m-value\">Example report workspace</div></div>\n      <div><div class=\"m-label\">Client</div><div class=\"m-value\">example-reports Retail</div></div>\n      <div><div class=\"m-label\">Project</div><div class=\"m-value\">example-reports Checkout Replatform</div></div>\n      <div><div class=\"m-label\">Reporting period</div><div class=\"m-value\">Q1 2026</div></div>\n      <div><div class=\"m-label\">Generated on</div><div class=\"m-value\">1 October 2026</div></div>\n      <div><div class=\"m-label\">Report version</div><div class=\"m-value\">Snapshot · v1.0</div></div>\n    </div>\n    <div class=\"cover-footer\"><p class=\"cover-note\">This report was generated by Scopeworth from the delivery signals connected to this workspace. Every figure links back to tickets, pull requests, releases and calendar evidence.</p><span>scopeworth.app</span></div>\n  </div></section>\n<section class=\"report-page\" aria-labelledby=\"exec-title\"><span class=\"page-label\">01 · Executive summary</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">01 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Section one</div><h2 id=\"exec-title\">Executive summary</h2></div><div class=\"meta\">Period · Q1 2026</div></div>\n    <p class=\"lead\">During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.</p>\n    <div class=\"grid grid-4 mt-24\">\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">Delivered work</div><div class=\"value num\">2<span class=\"unit\">items</span></div><ul><li><span>Merged PRs</span><span class=\"v\">2</span></li><li><span>Releases</span><span class=\"v\">1</span></li><li><span>Milestones</span><span class=\"v\">0</span></li></ul></div>\n      <div class=\"kpi accent-teal avoid-break\"><div class=\"label\">Delivery investment</div><div class=\"value num\">—</div><ul><li><span>Coordination</span><span class=\"v num\">$150</span></li><li><span>Scope expansion</span><span class=\"v num\">$6,600</span></li><li><span>Rework</span><span class=\"v num\">$0</span></li></ul></div>\n      <div class=\"kpi accent-amber avoid-break\"><div class=\"label\">Scope expansion</div><div class=\"value num\">$6,600</div><ul><li><span>Items after scope lock</span><span class=\"v\">2</span></li><li><span>Reopened tickets</span><span class=\"v\">0</span></li><li><span>Margin risk</span><span class=\"v\">Unknown</span></li></ul></div>\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">AI delivery impact</div><div class=\"value num\" style=\"font-size:18px;line-height:1.25\">Not yet measured</div><ul><li><span>Tag AI-assisted PRs</span><span class=\"v\">to unlock</span></li></ul></div>\n    </div>\n    <div class=\"callout amber mt-24 avoid-break\" style=\"padding:18px 20px\"><div style=\"display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap\"><div style=\"flex:1;min-width:280px\"><div style=\"display:flex;align-items:center;gap:8px;margin-bottom:6px\"><span style=\"display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:rgba(245,158,11,.16);color:#92400e;font-size:11px;font-weight:700\">!</span><strong style=\"font-size:14px;color:var(--ink);letter-spacing:-0.005em\">Recommended commercial action</strong></div><div style=\"font-size:13px;line-height:1.55;color:var(--charcoal)\">Discuss scope expansion before the next reporting cycle and convert recurring unplanned work into a change request or retainer adjustment.</div></div><div style=\"display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none\"><div style=\"display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid rgba(245,158,11,.35);border-radius:999px;padding:6px 12px 6px 8px\"><span style=\"width:8px;height:8px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 2px #fff;display:inline-block\"></span><span style=\"font-size:11px;font-weight:600;color:#92400e;letter-spacing:.04em;text-transform:uppercase\">Action this cycle</span></div><span style=\"font-size:11px;color:var(--muted)\">Owner · Delivery lead · due before next QBR</span></div></div></div>\n    <div class=\"grid grid-3 mt-24\">\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">What shipped</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">Refunds fail for split tender, Card vault migration</p></div>\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">What changed</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">2 items added after scope lock; 0 tickets reopened; 1h of attributed coordination.</p></div>\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">Needs attention</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">Ticket-to-PR linkage at 100%, meeting tagging at 100%, and explicit AI-assisted work tagging.</p></div>\n    </div></section>\n<section class=\"report-page\" aria-labelledby=\"ship-title\"><span class=\"page-label\">02 · What shipped</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">02 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Delivered work</div><h2 id=\"ship-title\">What shipped</h2></div><div class=\"meta\">Linked to tickets, PRs, and releases</div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Completed work items</div><div class=\"value num\">2</div><div class=\"sub\">Across feature, fix, and platform</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Merged PRs</div><div class=\"value num\">2</div><div class=\"sub\">100% linked to a ticket</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Releases</div><div class=\"value num\">1</div><div class=\"sub\">In the reporting period</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Delivery milestones</div><div class=\"value num\">0</div><div class=\"sub\">Customer-visible checkpoints</div></div>\n    </div>\n    <table class=\"avoid-break\" aria-label=\"Delivered work items\"><thead><tr><th>Work item</th><th>Type</th><th>Evidence</th><th>Status</th><th>Completed</th></tr></thead><tbody><tr><td><div class=\"row-title\">Refunds fail for split tender</div><div class=\"row-sub mono\">EXAMPLE-REPORTS-42</div></td><td><span class=\"chip \"><span class=\"dot\"></span>Bug fix</span></td><td class=\"num\">1 PR</td><td><span class=\"chip green\"><span class=\"dot\"></span>Shipped</span></td><td>2026-03-01</td></tr><tr><td><div class=\"row-title\">Card vault migration</div><div class=\"row-sub mono\">EXAMPLE-REPORTS-1</div></td><td><span class=\"chip blue\"><span class=\"dot\"></span>Feature</span></td><td class=\"num\">1 PR</td><td><span class=\"chip green\"><span class=\"dot\"></span>Shipped</span></td><td>2026-02-10</td></tr></tbody></table>\n    <div class=\"callout mt-24 avoid-break\"><strong>Delivery proof, not developer surveillance.</strong> Scopeworth links every report claim back to delivery evidence — tickets, pull requests, releases, and merges — so a client can verify what shipped without asking for a code review.</div></section>\n<section class=\"report-page\" aria-labelledby=\"cost-title\"><span class=\"page-label\">03 · What it cost</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">03 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Delivery investment</div><h2 id=\"cost-title\">What it cost</h2></div><div class=\"meta\">Estimated · directional figures</div></div>\n    <div class=\"grid grid-2 mb-24\">\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">Total estimated delivery investment</div><div class=\"value num\">—</div><div class=\"sub\" style=\"margin-top:8px\">Period delivery spend is not available. Contract value is not period spend.</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Cost composition</div><div class=\"stack mt-8\" role=\"img\" aria-label=\"Cost composition stacked bar\"><div style=\"width:0%;background:#F59E0B\" title=\"Scope expansion\"></div><div style=\"width:0%;background:#14B8A6\" title=\"Meetings &amp; coordination\"></div><div style=\"width:0%;background:#A78BFA\" title=\"Rework\"></div></div><div class=\"stack-legend\"><div class=\"item\"><span class=\"sw\" style=\"background:#F59E0B\"></span>Scope expansion · —</div><div class=\"item\"><span class=\"sw\" style=\"background:#14B8A6\"></span>Meetings &amp; coordination · —</div><div class=\"item\"><span class=\"sw\" style=\"background:#A78BFA\"></span>Rework · —</div></div><p class=\"muted mt-12\" style=\"font-size:12px\">Feature build, review and other delivery support are attributed once Invoice Defense's cost model is connected.</p></div>\n    </div>\n    <div class=\"card avoid-break mb-24\" style=\"padding:22px\"><h4 class=\"mb-16\">Estimated cost by category</h4><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Scope expansion</span><span class=\"v num\">$6,600 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#F59E0B\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Meetings &amp; coordination</span><span class=\"v num\">$150 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#14B8A6\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Rework</span><span class=\"v num\">$0 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#A78BFA\"></div></div></div></div></div>\n    <p class=\"muted mt-16\" style=\"font-size:12px\">These figures are directional and depend on available data, role-based cost assumptions, and project mapping quality. See report confidence.</p></section>\n<section class=\"report-page\" aria-labelledby=\"scope-title\"><span class=\"page-label\">04 · Scope expansion</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">04 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\" style=\"color:var(--amber)\">Margin risk</div><h2 id=\"scope-title\">Where scope changed</h2></div><div class=\"meta\">Scope expansion impact · estimated</div></div>\n    <div class=\"kpi accent-amber avoid-break mb-24\" style=\"padding:22px\"><div style=\"display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap\"><div><div class=\"label\">Estimated scope expansion impact</div><div class=\"value num\" style=\"font-size:42px\">$6,600</div><div class=\"sub\" style=\"margin-top:8px;max-width:420px\">Work added after the original scope was agreed, plus reopened and re-sized baseline work.</div></div><div style=\"display:flex;gap:8px;flex-wrap:wrap\"><span class=\"chip amber\"><span class=\"dot\"></span>Margin risk: Unknown</span><span class=\"chip\"><span class=\"dot\"></span>Convert to change request</span></div></div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Added after scope lock</div><div class=\"value num\">2<span class=\"unit\" style=\"font-size:14px;font-weight:600;color:var(--muted)\"> items</span></div><div class=\"sub\">Tickets created after the cycle started</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Reopened tickets</div><div class=\"value num\">0</div><div class=\"sub\">Reopened baseline work</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Estimates grown after lock</div><div class=\"value num\">0</div><div class=\"sub\">Baseline items re-sized</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Attributed coordination</div><div class=\"value num\">1h</div><div class=\"sub\">Attributed meetings</div></div>\n    </div>\n    <h4 class=\"mb-12\">Scope expansion signals</h4>\n    <table class=\"avoid-break\" aria-label=\"Scope expansion signals\"><thead><tr><th>Signal</th><th class=\"num\">Count</th><th class=\"num\">Estimated impact</th><th>Suggested action</th></tr></thead><tbody>\n      <tr><td><div class=\"row-title\">Tickets added after scope lock</div><div class=\"row-sub\">Created after the baseline</div></td><td class=\"num\">2</td><td class=\"num\">$6,600</td><td>Convert into change request</td></tr>\n      <tr><td><div class=\"row-title\">Reopened baseline tickets</div><div class=\"row-sub\">Reason for reopening not classified</div></td><td class=\"num\">0</td><td class=\"num\">$0</td><td>Clarify acceptance criteria</td></tr>\n      <tr><td><div class=\"row-title\">Estimates grown after lock</div><div class=\"row-sub\">Baseline items re-sized mid-cycle</div></td><td class=\"num\">0</td><td class=\"num\">$0</td><td>Add review owner earlier</td></tr>\n      <tr><td><div class=\"row-title\">Attributed coordination meetings</div><div class=\"row-sub\">Meeting purpose not classified</div></td><td class=\"num\">1h</td><td class=\"num\">$150</td><td>Separate discovery from delivery budget</td></tr>\n    </tbody></table>\n    <div class=\"callout amber mt-24 avoid-break\"><div style=\"font-style:italic;color:var(--muted);margin-bottom:6px\">“Why is this month’s invoice higher than expected?”</div><strong>What the delivery evidence for Q1 2026 shows.</strong> The team delivered 2 work items, 2 PRs and 1 release for example-reports Retail during Q1 2026, while also absorbing 2 additional work items worth an estimated $6,600 after the scope baseline.</div></section>\n<section class=\"report-page\" aria-labelledby=\"rework-title\"><span class=\"page-label\">05 · Rework &amp; quality</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">05 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Quality &amp; rework</div><h2 id=\"rework-title\">Where rework happened</h2></div><div class=\"meta\">Project-level signals · not individual scoring</div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Rework cost</div><div class=\"value num\">$0</div><div class=\"sub\">— of delivery investment</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Reopened tickets</div><div class=\"value num\">0</div><div class=\"sub\">Of 2 completed</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Estimates grown</div><div class=\"value num\">0</div><div class=\"sub\">Baseline items re-sized</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Unestimated movement</div><div class=\"value num\">0</div><div class=\"sub\">Counted, not valued</div></div>\n    </div>\n    <div class=\"callout avoid-break\"><strong>Interpretation.</strong> Rework here is reopened and re-sized baseline work, not individual performance. This suggests an opportunity to improve scope clarity and acceptance criteria before implementation starts — not to add pressure on individual engineers.</div>\n    <div class=\"callout green mt-12 avoid-break\"><strong>Recommended action.</strong> Add a scope confirmation checkpoint before implementation starts on high-complexity items. Capture acceptance criteria in the ticket and confirm with the client before the work enters the build queue.</div></section>\n<section class=\"report-page\" aria-labelledby=\"ai-title\"><span class=\"page-label\">06 · AI delivery economics</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">06 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\" style=\"color:var(--teal)\">AI-assisted delivery</div><h2 id=\"ai-title\">Modeled AI cycle-time comparison</h2></div><div class=\"meta\">Observed forge timestamps · self-reported AI tags</div></div>\n      <div class=\"callout avoid-break\"><strong>Not yet measured.</strong> AI-assisted delivery economics need at least one merged pull request tagged as AI-assisted and one non-assisted baseline merge in this project. Add an <em>ai-assisted</em> label or commit trailer to relevant work to unlock this section.</div></section>\n<section class=\"report-page\" aria-labelledby=\"conf-title\"><span class=\"page-label\">07 · Report confidence</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">07 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Trust &amp; data health</div><h2 id=\"conf-title\">How trustworthy this report is</h2></div><div class=\"meta\">Report confidence · Medium</div></div>\n    <div class=\"card avoid-break mb-24\" style=\"padding:22px\"><div class=\"conf-head\"><div class=\"conf-ring\" role=\"img\" aria-label=\"Confidence score\" style=\"background:conic-gradient(var(--amber) 0 80%, var(--subtle) 80% 100%);\"><div class=\"v\">80%<small>Score</small></div></div><div><h3>Medium confidence</h3><p class=\"muted\" style=\"margin:4px 0 0;font-size:13px;max-width:520px\">Weaker coverage on confirmed reporting assumptions and release / deployment evidence. Review the recommendations on this page to improve evidence coverage.</p></div></div>\n    <div class=\"grid grid-2 mt-16\"><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">PRs linked to tickets</span><span class=\"v num\">Linked merged changes</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Tickets mapped to client / project</span><span class=\"v num\">Workspace mapping coverage</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Meetings tagged to client / project</span><span class=\"v num\">No active calendar source</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div></div><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Rate card precision</span><span class=\"v num\">No labour hours in this period</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">AI-assisted work tagging</span><span class=\"v num\">Not tagged</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Release / deployment evidence</span><span class=\"v num\">Completed work with linked release evidence</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:50%;background:#F59E0B\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Synced evidence share</span><span class=\"v num\">Synced evidence coverage</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Source freshness</span><span class=\"v num\">No active sources</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Confirmed reporting assumptions</span><span class=\"v num\">0 of 6 reporting assumptions are confirmed or rectified for this period.</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#EF4444\"></div></div></div></div></div></div>\n    <div class=\"callout avoid-break mb-16\"><strong>Why this matters.</strong> Scopeworth does not pretend messy delivery data is perfect. Report confidence shows where the evidence is strong, where assumptions were used, and what should be improved before relying on the report for commercial decisions.</div>\n    <h4 class=\"mb-12\">Recommended data improvements</h4>\n    <div class=\"grid grid-2 mb-16\"><div class=\"card tight avoid-break\"><strong>1.</strong> Add client / project labels to all relevant tracker issues</div><div class=\"card tight avoid-break\"><strong>2.</strong> Include ticket IDs in PR titles or branch names</div><div class=\"card tight avoid-break\"><strong>3.</strong> Tag client / project names in calendar events</div><div class=\"card tight avoid-break\"><strong>4.</strong> Explicitly mark AI-assisted work where possible</div></div>\n    <div class=\"callout green avoid-break\"><strong>Scopeworth focuses on client, project, and team-level delivery proof.</strong> It is not designed to rank individual engineers or create performance-review leaderboards. Delivery proof, not developer surveillance.</div></section>\n<section class=\"report-page\" aria-labelledby=\"next-title\"><span class=\"page-label\">08 · Recommended actions</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">08 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">From insight to action</div><h2 id=\"next-title\">What to do next</h2></div><div class=\"meta\">Five commercial actions</div></div><div class=\"rec-grid mb-16\"><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">01</span><span class=\"chip amber\"><span class=\"dot\"></span>Margin</span></div><h4>Convert scope expansion into a change request</h4><div class=\"rc-row\"><b>Why</b>$6,600 of estimated delivery investment came from work added after scope lock.</div><div class=\"rc-row\"><b>Action</b>Review added items with the client and formalize the next-cycle scope.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">02</span><span class=\"chip blue\"><span class=\"dot\"></span>Process</span></div><h4>Separate discovery from implementation budget</h4><div class=\"rc-row\"><b>Why</b>1 meetings (1 h) were attributed to this project.</div><div class=\"rc-row\"><b>Action</b>Create a dedicated discovery / clarification budget bucket.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">03</span><span class=\"chip\"><span class=\"dot\"></span>Data</span></div><h4>Improve ticket-to-PR traceability</h4><div class=\"rc-row\"><b>Why</b>0% of PRs were not linked to tickets.</div><div class=\"rc-row\"><b>Action</b>Require ticket IDs in branch names and PR titles.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">04</span><span class=\"chip\"><span class=\"dot\" style=\"background:#A78BFA\"></span>AI</span></div><h4>Track AI-assisted work explicitly</h4><div class=\"rc-row\"><b>Why</b>AI-assisted delivery cannot be measured until assisted work is tagged.</div><div class=\"rc-row\"><b>Action</b>Add an AI-assisted field or label to relevant work items.</div></article><article class=\"rec-card avoid-break\" style=\"grid-column:1 / -1\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">05</span><span class=\"chip green\"><span class=\"dot\"></span>Client</span></div><h4>Use this report in the next client review</h4><div class=\"rc-row\"><b>Why</b>The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions.</div><div class=\"rc-row\"><b>Action</b>Use the executive summary and scope expansion sections in the next QBR or invoice discussion.</div></article></div></section>\n</main>\n\n</body>\n</html>",
                      "report": {
                        "context": {
                          "clientId": "22222222-2222-4222-8222-222222222222",
                          "clientName": "example-reports Retail",
                          "period": "Q1 2026",
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "projectName": "example-reports Checkout Replatform",
                          "qid": null,
                          "timeRange": "Jan 1–Mar 31"
                        },
                        "createdAt": "2026-10-01T08:30:28.684Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "lastSharedAt": null,
                        "name": "Synthetic delivery report",
                        "shares": [],
                        "snapshotId": "44444444-4444-4444-8444-444444444444",
                        "status": "draft",
                        "updatedAt": "2026-10-01T08:30:28.684Z"
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "document": {
                      "additionalProperties": false,
                      "properties": {
                        "agencyName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "branded": {
                          "type": "boolean"
                        },
                        "composition": {
                          "additionalProperties": false,
                          "properties": {
                            "context": {
                              "additionalProperties": false,
                              "properties": {
                                "clientId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "clientName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "period": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "periodStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "projectId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "qid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "timeRange": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "clientId",
                                "clientName",
                                "projectId",
                                "projectName",
                                "periodStart",
                                "periodEnd",
                                "period",
                                "timeRange",
                                "qid"
                              ],
                              "type": "object"
                            },
                            "invoiceNarratives": {
                              "additionalProperties": {
                                "maxLength": 20000,
                                "type": "string"
                              },
                              "propertyNames": {
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "ai": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "forensics": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "invoice": {
                                  "additionalProperties": {
                                    "additionalProperties": {
                                      "type": "boolean"
                                    },
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "layout": {
                              "additionalProperties": false,
                              "properties": {
                                "order": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "sections": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": {
                                        "type": "boolean"
                                      },
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "order",
                                "sections"
                              ],
                              "type": "object"
                            },
                            "narrative": {
                              "maxLength": 20000,
                              "type": "string"
                            },
                            "narrativeProvenance": {
                              "additionalProperties": false,
                              "properties": {
                                "modelId": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "outcome": {
                                  "enum": [
                                    "template",
                                    "generated"
                                  ],
                                  "type": "string"
                                },
                                "promptVersion": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "provider": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "openai",
                                        "anthropic"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "outcome",
                                "provider",
                                "modelId",
                                "promptVersion"
                              ],
                              "type": "object"
                            },
                            "tone": {
                              "enum": [
                                "default",
                                "executive",
                                "friendly",
                                "custom"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "context",
                            "layout",
                            "items",
                            "narrative",
                            "tone"
                          ],
                          "type": "object"
                        },
                        "facts": {
                          "additionalProperties": false,
                          "properties": {
                            "actions": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "action": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "n": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  },
                                  "tag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "tone": {
                                    "enum": [
                                      "amber",
                                      "blue",
                                      "neutral",
                                      "purple",
                                      "green"
                                    ],
                                    "type": "string"
                                  },
                                  "why": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "n",
                                  "tag",
                                  "tone",
                                  "title",
                                  "why",
                                  "action"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "ai": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "assistedPct": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "implementationHoursSaved": {
                                      "type": "number"
                                    },
                                    "netHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadPct": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "assistedPct",
                                    "implementationHoursSaved",
                                    "reviewOverheadHours",
                                    "netHours",
                                    "reviewOverheadPct"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "aiInsufficientSample": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "mergedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "taggedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "mergedChanges",
                                    "taggedChanges"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "assumptions": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "effectiveFrom": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "effectiveTo": {
                                    "anyOf": [
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "enum": [
                                      "cost-basis",
                                      "scope-baseline",
                                      "meeting-attribution",
                                      "ai-attribution",
                                      "reporting-period",
                                      "work-cost-allocation"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "default",
                                      "option",
                                      "manual",
                                      "date_range"
                                    ],
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "needs_verification",
                                      "confirmed",
                                      "rectified"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "unitOrMethod": {
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "value": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "versionId": {
                                    "anyOf": [
                                      {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "value",
                                  "unitOrMethod",
                                  "source",
                                  "status",
                                  "effectiveFrom",
                                  "effectiveTo",
                                  "versionId"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "confidence": {
                              "additionalProperties": false,
                              "properties": {
                                "hints": {
                                  "default": [],
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "label": {
                                  "default": "Not measured",
                                  "enum": [
                                    "High",
                                    "Medium",
                                    "Low",
                                    "Not measured"
                                  ],
                                  "type": "string"
                                },
                                "score": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "signals": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "evidence": {
                                        "additionalProperties": false,
                                        "default": {
                                          "denominator": null,
                                          "numerator": null,
                                          "query": "Evidence path was not recorded in this historical snapshot."
                                        },
                                        "properties": {
                                          "denominator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "numerator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "query": {
                                            "default": "Evidence path was not recorded in this historical snapshot.",
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "numerator",
                                          "denominator",
                                          "query"
                                        ],
                                        "type": "object"
                                      },
                                      "id": {
                                        "enum": [
                                          "prs_linked",
                                          "items_mapped",
                                          "meetings_tagged",
                                          "rate_card",
                                          "ai_tagging",
                                          "release_evidence",
                                          "manual_entry_share",
                                          "freshness",
                                          "assumptions"
                                        ],
                                        "type": "string"
                                      },
                                      "label": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "note": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "pct": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "weight": {
                                        "default": 1,
                                        "exclusiveMinimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "pct",
                                      "weight",
                                      "contribution",
                                      "evidence",
                                      "note"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "score",
                                "label",
                                "signals",
                                "hints"
                              ],
                              "type": "object"
                            },
                            "coordination": {
                              "additionalProperties": false,
                              "properties": {
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "declined": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "hours": {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "meetings": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "taggingPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "meetings",
                                "hours",
                                "declined",
                                "costCents",
                                "blendedHourlyRateCents",
                                "taggingPct"
                              ],
                              "type": "object"
                            },
                            "currency": {
                              "anyOf": [
                                {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "delivery": {
                              "additionalProperties": false,
                              "properties": {
                                "completedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "mergedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "milestones": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesCompleted": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesTotal": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "prsLinkedPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "releaseRows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "items": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "name": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "releasedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "releaseId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "releaseId",
                                      "name",
                                      "releasedAt",
                                      "items"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "releases": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "rows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "completedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "externalKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "linkedChanges": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "title": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "type": {
                                        "enum": [
                                          "epic",
                                          "story",
                                          "task",
                                          "bug",
                                          "subtask",
                                          "other"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "anyOf": [
                                          {
                                            "format": "uri",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "workItemId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "workItemId",
                                      "title",
                                      "externalKey",
                                      "type",
                                      "linkedChanges",
                                      "completedAt",
                                      "url"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "completedItems",
                                "mergedChanges",
                                "releases",
                                "milestones",
                                "objectivesTotal",
                                "objectivesCompleted",
                                "prsLinkedPct",
                                "rows",
                                "releaseRows"
                              ],
                              "type": "object"
                            },
                            "evidencePackages": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "caseId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "contentHash": {
                                    "type": "string"
                                  },
                                  "createdAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "memo",
                                      "cr",
                                      "qbr"
                                    ],
                                    "type": "string"
                                  },
                                  "snapshot": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "case": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "agencyName": {
                                            "type": "string"
                                          },
                                          "clientName": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "confidence": {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "periodEnd": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "periodLabel": {
                                            "type": "string"
                                          },
                                          "periodStart": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "projectName": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "enum": [
                                              "Open",
                                              "Investigating",
                                              "Evidence gathered",
                                              "Disposition",
                                              "Resolved",
                                              "Filed"
                                            ],
                                            "type": "string"
                                          },
                                          "subtitle": {
                                            "type": "string"
                                          },
                                          "title": {
                                            "type": "string"
                                          },
                                          "typology": {
                                            "anyOf": [
                                              {
                                                "enum": [
                                                  "expansion",
                                                  "acdrift",
                                                  "rework",
                                                  "untraced",
                                                  "cost"
                                                ],
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "title",
                                          "subtitle",
                                          "status",
                                          "typology",
                                          "periodStart",
                                          "periodEnd",
                                          "periodLabel",
                                          "clientName",
                                          "projectName",
                                          "agencyName",
                                          "confidence"
                                        ],
                                        "type": "object"
                                      },
                                      "claims": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "id": {
                                              "minLength": 1,
                                              "type": "string"
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "text": {
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "text",
                                            "nodeIds",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "custody": {
                                        "additionalProperties": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "id": {
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "kind": {
                                                "enum": [
                                                  "jira",
                                                  "pr",
                                                  "release",
                                                  "meeting",
                                                  "note"
                                                ],
                                                "type": "string"
                                              },
                                              "meta": {
                                                "type": "string"
                                              },
                                              "t": {
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "id",
                                              "t",
                                              "meta"
                                            ],
                                            "type": "object"
                                          },
                                          "type": "array"
                                        },
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "draft": {
                                        "type": "boolean"
                                      },
                                      "engine": {
                                        "enum": [
                                          "template",
                                          "claude"
                                        ],
                                        "type": "string"
                                      },
                                      "flags": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "detail": {
                                              "type": "string"
                                            },
                                            "disposition": {
                                              "anyOf": [
                                                {
                                                  "enum": [
                                                    "inscope",
                                                    "cr",
                                                    "billable",
                                                    "writeoff",
                                                    "decision"
                                                  ],
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "dispositionLabel": {
                                              "type": "string"
                                            },
                                            "evidenceMissing": {
                                              "type": "boolean"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "impact": {
                                              "type": "string"
                                            },
                                            "impactCents": {
                                              "anyOf": [
                                                {
                                                  "maximum": 9007199254740991,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "rationale": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "resolvedAt": {
                                              "anyOf": [
                                                {
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "severity": {
                                              "enum": [
                                                "amber",
                                                "red"
                                              ],
                                              "type": "string"
                                            },
                                            "signalKey": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "type": "string"
                                            },
                                            "typology": {
                                              "enum": [
                                                "added-after-lock",
                                                "reopened-from",
                                                "estimate-growth",
                                                "meeting-overrun",
                                                "untraced"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "signalKey",
                                            "typology",
                                            "severity",
                                            "title",
                                            "detail",
                                            "impact",
                                            "impactCents",
                                            "nodeIds",
                                            "disposition",
                                            "dispositionLabel",
                                            "rationale",
                                            "resolvedAt",
                                            "evidenceMissing",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "generatedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "memo",
                                          "cr",
                                          "qbr"
                                        ],
                                        "type": "string"
                                      },
                                      "notes": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "at": {
                                              "format": "date-time",
                                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                              "type": "string"
                                            },
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "authorName": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "body": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "targetNodeId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "authorName",
                                            "at",
                                            "targetNodeId",
                                            "body",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "prose": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "sections": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "body": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                },
                                                "heading": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "heading",
                                                "body"
                                              ],
                                              "type": "object"
                                            },
                                            "type": "array"
                                          },
                                          "summary": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "title": {
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "title",
                                          "summary",
                                          "sections"
                                        ],
                                        "type": "object"
                                      },
                                      "provenance": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphBuild": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "graphHash": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "id": {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                    "type": "string"
                                                  },
                                                  "profile": {
                                                    "type": "string"
                                                  },
                                                  "rulesVersion": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "graphHash",
                                                  "rulesVersion",
                                                  "profile"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "lock": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "approvalRef": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "authority": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "effectiveAt": {
                                                    "format": "date-time",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                                    "type": "string"
                                                  },
                                                  "lockedOn": {
                                                    "format": "date",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                    "type": "string"
                                                  },
                                                  "lockId": {
                                                    "anyOf": [
                                                      {
                                                        "format": "uuid",
                                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "memberCount": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 0,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "provenance": {
                                                    "enum": [
                                                      "explicit",
                                                      "register_scope_lock_date",
                                                      "engagement_starts_on"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "reconstructed": {
                                                    "type": "boolean"
                                                  },
                                                  "resolverVersion": {
                                                    "type": "string"
                                                  },
                                                  "timeZone": {
                                                    "type": "string"
                                                  },
                                                  "version": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 1,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "lockId",
                                                  "version",
                                                  "lockedOn",
                                                  "effectiveAt",
                                                  "timeZone",
                                                  "provenance",
                                                  "reconstructed",
                                                  "authority",
                                                  "approvalRef",
                                                  "memberCount",
                                                  "resolverVersion"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lock",
                                          "graphBuild"
                                        ],
                                        "type": "object"
                                      },
                                      "version": {
                                        "const": 1,
                                        "type": "number"
                                      },
                                      "watermark": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "version",
                                      "kind",
                                      "draft",
                                      "watermark",
                                      "case",
                                      "flags",
                                      "notes",
                                      "custody",
                                      "claims",
                                      "prose",
                                      "engine",
                                      "generatedAt"
                                    ],
                                    "type": "object"
                                  },
                                  "status": {
                                    "enum": [
                                      "draft",
                                      "final"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "caseId",
                                  "kind",
                                  "status",
                                  "contentHash",
                                  "createdAt",
                                  "snapshot"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "investment": {
                              "additionalProperties": false,
                              "properties": {
                                "cloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "coordinationCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "coordinationPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costEvidence": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "cloudLines": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "linkedTimeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "timeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        }
                                      },
                                      "required": [
                                        "timeEntries",
                                        "linkedTimeEntries",
                                        "cloudLines"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "currencyConflict": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimated": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimatedCloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "invoicedCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCategories": {
                                  "anyOf": [
                                    {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "category": {
                                            "enum": [
                                              "feature",
                                              "bug",
                                              "other_linked",
                                              "unlinked"
                                            ],
                                            "type": "string"
                                          },
                                          "cents": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "hours": {
                                            "minimum": 0,
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "category",
                                          "cents",
                                          "hours"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "reworkCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reworkPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "roleBandHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "scopeCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "scopePct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "totalCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unpricedHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "totalCents",
                                "labourCents",
                                "labourHours",
                                "unpricedHours",
                                "roleBandHours",
                                "cloudCents",
                                "estimatedCloudCents",
                                "estimated",
                                "invoicedCents",
                                "coordinationCents",
                                "coordinationPct",
                                "scopeCents",
                                "scopePct",
                                "reworkCents",
                                "reworkPct",
                                "labourCategories",
                                "currencyConflict",
                                "costEvidence"
                              ],
                              "type": "object"
                            },
                            "manualEntrySharePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "periodEnd": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "periodStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "scope": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "addedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "addedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "blendedHourlyRateCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "grownCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "grownItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "priced": {
                                      "type": "boolean"
                                    },
                                    "reopenedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "reopenedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "scopeLockOn": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "totalCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "scopeLockOn",
                                    "totalCents",
                                    "priced",
                                    "addedItems",
                                    "addedCents",
                                    "reopenedItems",
                                    "reopenedCents",
                                    "grownItems",
                                    "grownCents",
                                    "unestimated",
                                    "blendedHourlyRateCents"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sources": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "projectRows": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "reason": {
                                    "enum": [
                                      "no_activity",
                                      "unattributed",
                                      "empty"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "commercial",
                                      "tracker",
                                      "code",
                                      "release",
                                      "calendar"
                                    ],
                                    "type": "string"
                                  },
                                  "state": {
                                    "enum": [
                                      "data_present",
                                      "not_connected",
                                      "no_data"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source",
                                  "state",
                                  "label"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "periodStart",
                            "periodEnd",
                            "currency",
                            "delivery",
                            "investment",
                            "scope",
                            "coordination",
                            "ai",
                            "aiInsufficientSample",
                            "confidence",
                            "sources",
                            "manualEntrySharePct",
                            "assumptions",
                            "actions",
                            "evidencePackages"
                          ],
                          "type": "object"
                        },
                        "generatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "teamType": {
                          "anyOf": [
                            {
                              "enum": [
                                "agency",
                                "inhouse",
                                "external"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "const": 1,
                          "type": "number"
                        }
                      },
                      "required": [
                        "version",
                        "agencyName",
                        "composition",
                        "facts",
                        "branded",
                        "generatedAt"
                      ],
                      "type": "object"
                    },
                    "html": {
                      "type": "string"
                    },
                    "report": {
                      "additionalProperties": false,
                      "properties": {
                        "context": {
                          "additionalProperties": false,
                          "properties": {
                            "clientId": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "clientName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "period": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "periodEnd": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "periodStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "projectId": {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            },
                            "projectName": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "qid": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "timeRange": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "clientId",
                            "clientName",
                            "projectId",
                            "projectName",
                            "periodStart",
                            "periodEnd",
                            "period",
                            "timeRange",
                            "qid"
                          ],
                          "type": "object"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "lastSharedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "snapshotId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "draft",
                            "shipped"
                          ],
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "status",
                        "context",
                        "snapshotId",
                        "lastSharedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "report",
                    "document",
                    "html"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Retrieve stored report facts and HTML",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder/{id}/pdf": {
      "get": {
        "description": "Download application/pdf with attachment filename report.pdf, private/no-store. Requires current reports.export independently of the reports:read key scope. The existing bounded renderer/store prints frozen snapshot HTML; cached downloads do not regenerate facts. Missing rendering support returns 503, never a fabricated file. No asynchronous job or polling route exists. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.pdf",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "description": "Actual frozen snapshot PDF bytes; the synthetic runtime sample is only a PDF signature, not a complete PDF.",
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Download the stored snapshot as PDF",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.export",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder/facts": {
      "get": {
        "description": "Read supported source facts, partial/no-evidence states and three deterministic template narratives for one project and ordered period. GET never dispatches a model. Current plan data windows apply. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.facts",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-01-01",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-03-31",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "agencyName": "Example report workspace",
                      "engine": "template",
                      "facts": {
                        "actions": [
                          {
                            "action": "Review added items with the client and formalize the next-cycle scope.",
                            "n": 1,
                            "tag": "Margin",
                            "title": "Convert scope expansion into a change request",
                            "tone": "amber",
                            "why": "$6,600 of estimated delivery investment came from work added after scope lock."
                          },
                          {
                            "action": "Create a dedicated discovery / clarification budget bucket.",
                            "n": 2,
                            "tag": "Process",
                            "title": "Separate discovery from implementation budget",
                            "tone": "blue",
                            "why": "1 meetings (1 h) were attributed to this project."
                          },
                          {
                            "action": "Require ticket IDs in branch names and PR titles.",
                            "n": 3,
                            "tag": "Data",
                            "title": "Improve ticket-to-PR traceability",
                            "tone": "neutral",
                            "why": "0% of PRs were not linked to tickets."
                          },
                          {
                            "action": "Add an AI-assisted field or label to relevant work items.",
                            "n": 4,
                            "tag": "AI",
                            "title": "Track AI-assisted work explicitly",
                            "tone": "purple",
                            "why": "AI-assisted delivery cannot be measured until assisted work is tagged."
                          },
                          {
                            "action": "Use the executive summary and scope expansion sections in the next QBR or invoice discussion.",
                            "n": 5,
                            "tag": "Client",
                            "title": "Use this report in the next client review",
                            "tone": "green",
                            "why": "The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions."
                          }
                        ],
                        "ai": null,
                        "aiInsufficientSample": null,
                        "assumptions": [
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "cost-basis",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Cost estimate basis",
                            "unitOrMethod": "person_then_role",
                            "value": "$150/h",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "scope-baseline",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Scope baseline",
                            "unitOrMethod": "engagement_start",
                            "value": "1 work items",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "meeting-attribution",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Meeting attribution",
                            "unitOrMethod": "project_tagged",
                            "value": "100% tagged",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "ai-attribution",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "AI attribution",
                            "unitOrMethod": "self_reported",
                            "value": "Self-reported labels and trailers",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "reporting-period",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Reporting period",
                            "unitOrMethod": "active_range",
                            "value": "Jan 1 – Mar 31, 2026",
                            "versionId": null
                          },
                          {
                            "effectiveFrom": "2026-01-01",
                            "effectiveTo": null,
                            "id": "work-cost-allocation",
                            "source": "default",
                            "status": "needs_verification",
                            "title": "Work-item cost allocation",
                            "unitOrMethod": "not_allocated",
                            "value": "Team estimate only",
                            "versionId": null
                          }
                        ],
                        "confidence": {
                          "hints": [
                            "Tag calendar events with the client or project.",
                            "Add person-level rates for worked hours; role rates remain partial.",
                            "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                            "Reconnect or sync sources so their latest successful data is current.",
                            "Confirm or rectify the reporting assumptions used for this period.",
                            "Connect deployment evidence to completed work items."
                          ],
                          "label": "Medium",
                          "score": 80,
                          "signals": [
                            {
                              "contribution": 29.63,
                              "evidence": {
                                "denominator": 2,
                                "numerator": 2,
                                "query": "Merged code changes linked to normalized work items in the report period."
                              },
                              "id": "prs_linked",
                              "label": "PRs linked to tickets",
                              "note": "Linked merged changes",
                              "pct": 100,
                              "weight": 16
                            },
                            {
                              "contribution": 25.93,
                              "evidence": {
                                "denominator": 3,
                                "numerator": 3,
                                "query": "Workspace work items in the report period with a normalized project mapping."
                              },
                              "id": "items_mapped",
                              "label": "Tickets mapped to client / project",
                              "note": "Workspace mapping coverage",
                              "pct": 100,
                              "weight": 14
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": null,
                                "numerator": null,
                                "query": "An active Google Calendar connection is required before calendar tagging is measured."
                              },
                              "id": "meetings_tagged",
                              "label": "Meetings tagged to client / project",
                              "note": "No active calendar source",
                              "pct": null,
                              "weight": 12
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                              },
                              "id": "rate_card",
                              "label": "Rate card precision",
                              "note": "No labour hours in this period",
                              "pct": null,
                              "weight": 14
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": null,
                                "numerator": null,
                                "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                              },
                              "id": "ai_tagging",
                              "label": "AI-assisted work tagging",
                              "note": "Not tagged",
                              "pct": null,
                              "weight": 12
                            },
                            {
                              "contribution": 9.26,
                              "evidence": {
                                "denominator": 2,
                                "numerator": 1,
                                "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                              },
                              "id": "release_evidence",
                              "label": "Release / deployment evidence",
                              "note": "Completed work with linked release evidence",
                              "pct": 50,
                              "weight": 10
                            },
                            {
                              "contribution": 14.81,
                              "evidence": {
                                "denominator": 100,
                                "numerator": 100,
                                "query": "Synced rather than manual or CSV evidence rows in the report context."
                              },
                              "id": "manual_entry_share",
                              "label": "Synced evidence share",
                              "note": "Synced evidence coverage",
                              "pct": 100,
                              "weight": 8
                            },
                            {
                              "contribution": null,
                              "evidence": {
                                "denominator": 0,
                                "numerator": 0,
                                "query": "Latest successful sync per active connection, measured against the report period end."
                              },
                              "id": "freshness",
                              "label": "Source freshness",
                              "note": "No active sources",
                              "pct": null,
                              "weight": 8
                            },
                            {
                              "contribution": 0,
                              "evidence": {
                                "denominator": 6,
                                "numerator": 0,
                                "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                              },
                              "id": "assumptions",
                              "label": "Confirmed reporting assumptions",
                              "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                              "pct": 0,
                              "weight": 6
                            }
                          ]
                        },
                        "coordination": {
                          "blendedHourlyRateCents": 15000,
                          "costCents": 15000,
                          "declined": 0,
                          "hours": 1,
                          "meetings": 1,
                          "taggingPct": 100
                        },
                        "currency": "USD",
                        "delivery": {
                          "completedItems": 2,
                          "mergedChanges": 2,
                          "milestones": 0,
                          "objectivesCompleted": 0,
                          "objectivesTotal": 0,
                          "prsLinkedPct": 100,
                          "releaseRows": [
                            {
                              "items": 1,
                              "name": "v1.4.0",
                              "releasedAt": "2026-02-12T18:00:00.000Z",
                              "releaseId": "00000000-0000-4000-8000-000000000007"
                            }
                          ],
                          "releases": 1,
                          "rows": [
                            {
                              "completedAt": "2026-03-01T10:00:00.000Z",
                              "externalKey": "EXAMPLE-REPORTS-42",
                              "linkedChanges": 1,
                              "title": "Refunds fail for split tender",
                              "type": "bug",
                              "url": null,
                              "workItemId": "00000000-0000-4000-8000-000000000005"
                            },
                            {
                              "completedAt": "2026-02-10T16:30:00.000Z",
                              "externalKey": "EXAMPLE-REPORTS-1",
                              "linkedChanges": 1,
                              "title": "Card vault migration",
                              "type": "story",
                              "url": null,
                              "workItemId": "00000000-0000-4000-8000-000000000006"
                            }
                          ]
                        },
                        "evidencePackages": [],
                        "investment": {
                          "cloudCents": 0,
                          "coordinationCents": 15000,
                          "coordinationPct": null,
                          "costEvidence": {
                            "cloudLines": 0,
                            "linkedTimeEntries": 0,
                            "timeEntries": 0
                          },
                          "currencyConflict": false,
                          "estimated": false,
                          "estimatedCloudCents": 0,
                          "invoicedCents": null,
                          "labourCategories": [],
                          "labourCents": 0,
                          "labourHours": 0,
                          "reworkCents": 0,
                          "reworkPct": null,
                          "roleBandHours": 0,
                          "scopeCents": 660000,
                          "scopePct": null,
                          "totalCents": null,
                          "unpricedHours": 0
                        },
                        "manualEntrySharePct": 0,
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "scope": {
                          "addedCents": 660000,
                          "addedItems": 2,
                          "blendedHourlyRateCents": 15000,
                          "grownCents": 0,
                          "grownItems": 0,
                          "priced": true,
                          "reopenedCents": 0,
                          "reopenedItems": 0,
                          "scopeLockOn": "2026-01-01",
                          "totalCents": 660000,
                          "unestimated": 0
                        },
                        "sources": [
                          {
                            "label": "Contracts",
                            "source": "commercial",
                            "state": "data_present"
                          },
                          {
                            "label": "Tracker",
                            "source": "tracker",
                            "state": "data_present"
                          },
                          {
                            "label": "Code",
                            "source": "code",
                            "state": "data_present"
                          },
                          {
                            "label": "Releases",
                            "source": "release",
                            "state": "data_present"
                          },
                          {
                            "label": "Calendar",
                            "source": "calendar",
                            "state": "data_present"
                          }
                        ]
                      },
                      "narratives": {
                        "default": "During 2026-01-01 – 2026-03-31, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                        "executive": "2026-01-01 – 2026-03-31 — example-reports Retail · example-reports Checkout Replatform. Period delivery spend is not yet available; contract value is not treated as period spend. Estimated scope expansion is $6,600 introduced after the baseline. AI delivery gain: not yet measured. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period. Recommended action: convert added scope into a formal change request before the next cycle.",
                        "friendly": "Hi example-reports team — here’s the recap for 2026-01-01 – 2026-03-31. We delivered 2 work items, merged 2 PRs, and shipped 1 release. Additional work items were introduced after we locked scope, with an estimated value of $6,600. We’d love to align the next cycle around a formal change request."
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "agencyName": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "engine": {
                      "enum": [
                        "template",
                        "claude",
                        "openai"
                      ],
                      "type": "string"
                    },
                    "facts": {
                      "additionalProperties": false,
                      "properties": {
                        "actions": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "action": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "n": {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              "tag": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "tone": {
                                "enum": [
                                  "amber",
                                  "blue",
                                  "neutral",
                                  "purple",
                                  "green"
                                ],
                                "type": "string"
                              },
                              "why": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "n",
                              "tag",
                              "tone",
                              "title",
                              "why",
                              "action"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "ai": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "assistedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "assistedPct": {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "baselineChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "implementationHoursSaved": {
                                  "type": "number"
                                },
                                "netHours": {
                                  "type": "number"
                                },
                                "reviewOverheadHours": {
                                  "type": "number"
                                },
                                "reviewOverheadPct": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "assistedChanges",
                                "baselineChanges",
                                "assistedPct",
                                "implementationHoursSaved",
                                "reviewOverheadHours",
                                "netHours",
                                "reviewOverheadPct"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "aiInsufficientSample": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "assistedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "baselineChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "mergedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "taggedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "assistedChanges",
                                "baselineChanges",
                                "mergedChanges",
                                "taggedChanges"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "assumptions": {
                          "default": [],
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "effectiveFrom": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "effectiveTo": {
                                "anyOf": [
                                  {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "enum": [
                                  "cost-basis",
                                  "scope-baseline",
                                  "meeting-attribution",
                                  "ai-attribution",
                                  "reporting-period",
                                  "work-cost-allocation"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "default",
                                  "option",
                                  "manual",
                                  "date_range"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "needs_verification",
                                  "confirmed",
                                  "rectified"
                                ],
                                "type": "string"
                              },
                              "title": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "unitOrMethod": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "value": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "versionId": {
                                "anyOf": [
                                  {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "value",
                              "unitOrMethod",
                              "source",
                              "status",
                              "effectiveFrom",
                              "effectiveTo",
                              "versionId"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "confidence": {
                          "additionalProperties": false,
                          "properties": {
                            "hints": {
                              "default": [],
                              "items": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "label": {
                              "default": "Not measured",
                              "enum": [
                                "High",
                                "Medium",
                                "Low",
                                "Not measured"
                              ],
                              "type": "string"
                            },
                            "score": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "signals": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "contribution": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "evidence": {
                                    "additionalProperties": false,
                                    "default": {
                                      "denominator": null,
                                      "numerator": null,
                                      "query": "Evidence path was not recorded in this historical snapshot."
                                    },
                                    "properties": {
                                      "denominator": {
                                        "anyOf": [
                                          {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "numerator": {
                                        "anyOf": [
                                          {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "query": {
                                        "default": "Evidence path was not recorded in this historical snapshot.",
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "numerator",
                                      "denominator",
                                      "query"
                                    ],
                                    "type": "object"
                                  },
                                  "id": {
                                    "enum": [
                                      "prs_linked",
                                      "items_mapped",
                                      "meetings_tagged",
                                      "rate_card",
                                      "ai_tagging",
                                      "release_evidence",
                                      "manual_entry_share",
                                      "freshness",
                                      "assumptions"
                                    ],
                                    "type": "string"
                                  },
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "note": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "pct": {
                                    "anyOf": [
                                      {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "default": 1,
                                    "exclusiveMinimum": 0,
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "pct",
                                  "weight",
                                  "contribution",
                                  "evidence",
                                  "note"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "score",
                            "label",
                            "signals",
                            "hints"
                          ],
                          "type": "object"
                        },
                        "coordination": {
                          "additionalProperties": false,
                          "properties": {
                            "blendedHourlyRateCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "costCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "declined": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "hours": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "meetings": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "taggingPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "meetings",
                            "hours",
                            "declined",
                            "costCents",
                            "blendedHourlyRateCents",
                            "taggingPct"
                          ],
                          "type": "object"
                        },
                        "currency": {
                          "anyOf": [
                            {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "delivery": {
                          "additionalProperties": false,
                          "properties": {
                            "completedItems": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "mergedChanges": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "milestones": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "objectivesCompleted": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "objectivesTotal": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "prsLinkedPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "releaseRows": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "items": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "releasedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "releaseId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "releaseId",
                                  "name",
                                  "releasedAt",
                                  "items"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "releases": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "rows": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "completedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "externalKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "linkedChanges": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "epic",
                                      "story",
                                      "task",
                                      "bug",
                                      "subtask",
                                      "other"
                                    ],
                                    "type": "string"
                                  },
                                  "url": {
                                    "anyOf": [
                                      {
                                        "format": "uri",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workItemId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "workItemId",
                                  "title",
                                  "externalKey",
                                  "type",
                                  "linkedChanges",
                                  "completedAt",
                                  "url"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "completedItems",
                            "mergedChanges",
                            "releases",
                            "milestones",
                            "objectivesTotal",
                            "objectivesCompleted",
                            "prsLinkedPct",
                            "rows",
                            "releaseRows"
                          ],
                          "type": "object"
                        },
                        "evidencePackages": {
                          "default": [],
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "caseId": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "contentHash": {
                                "type": "string"
                              },
                              "createdAt": {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              "id": {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              "kind": {
                                "enum": [
                                  "memo",
                                  "cr",
                                  "qbr"
                                ],
                                "type": "string"
                              },
                              "snapshot": {
                                "additionalProperties": false,
                                "properties": {
                                  "case": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "agencyName": {
                                        "type": "string"
                                      },
                                      "clientName": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "confidence": {
                                        "maximum": 100,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "id": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      "periodEnd": {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      "periodLabel": {
                                        "type": "string"
                                      },
                                      "periodStart": {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      "projectName": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "enum": [
                                          "Open",
                                          "Investigating",
                                          "Evidence gathered",
                                          "Disposition",
                                          "Resolved",
                                          "Filed"
                                        ],
                                        "type": "string"
                                      },
                                      "subtitle": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "typology": {
                                        "anyOf": [
                                          {
                                            "enum": [
                                              "expansion",
                                              "acdrift",
                                              "rework",
                                              "untraced",
                                              "cost"
                                            ],
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "subtitle",
                                      "status",
                                      "typology",
                                      "periodStart",
                                      "periodEnd",
                                      "periodLabel",
                                      "clientName",
                                      "projectName",
                                      "agencyName",
                                      "confidence"
                                    ],
                                    "type": "object"
                                  },
                                  "claims": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "id": {
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "nodeIds": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "text": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "text",
                                        "nodeIds",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "custody": {
                                    "additionalProperties": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "id": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "kind": {
                                            "enum": [
                                              "jira",
                                              "pr",
                                              "release",
                                              "meeting",
                                              "note"
                                            ],
                                            "type": "string"
                                          },
                                          "meta": {
                                            "type": "string"
                                          },
                                          "t": {
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "id",
                                          "t",
                                          "meta"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "draft": {
                                    "type": "boolean"
                                  },
                                  "engine": {
                                    "enum": [
                                      "template",
                                      "claude"
                                    ],
                                    "type": "string"
                                  },
                                  "flags": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "detail": {
                                          "type": "string"
                                        },
                                        "disposition": {
                                          "anyOf": [
                                            {
                                              "enum": [
                                                "inscope",
                                                "cr",
                                                "billable",
                                                "writeoff",
                                                "decision"
                                              ],
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "dispositionLabel": {
                                          "type": "string"
                                        },
                                        "evidenceMissing": {
                                          "type": "boolean"
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "impact": {
                                          "type": "string"
                                        },
                                        "impactCents": {
                                          "anyOf": [
                                            {
                                              "maximum": 9007199254740991,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "nodeIds": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "rationale": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "resolvedAt": {
                                          "anyOf": [
                                            {
                                              "format": "date-time",
                                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "severity": {
                                          "enum": [
                                            "amber",
                                            "red"
                                          ],
                                          "type": "string"
                                        },
                                        "signalKey": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "type": "string"
                                        },
                                        "typology": {
                                          "enum": [
                                            "added-after-lock",
                                            "reopened-from",
                                            "estimate-growth",
                                            "meeting-overrun",
                                            "untraced"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "signalKey",
                                        "typology",
                                        "severity",
                                        "title",
                                        "detail",
                                        "impact",
                                        "impactCents",
                                        "nodeIds",
                                        "disposition",
                                        "dispositionLabel",
                                        "rationale",
                                        "resolvedAt",
                                        "evidenceMissing",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "generatedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "memo",
                                      "cr",
                                      "qbr"
                                    ],
                                    "type": "string"
                                  },
                                  "notes": {
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "at": {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                          "type": "string"
                                        },
                                        "auditEventIds": {
                                          "items": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "authorName": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "body": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "targetNodeId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "authorName",
                                        "at",
                                        "targetNodeId",
                                        "body",
                                        "auditEventIds"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "prose": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "sections": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "body": {
                                              "minLength": 1,
                                              "type": "string"
                                            },
                                            "heading": {
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "heading",
                                            "body"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "summary": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "title": {
                                        "minLength": 1,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "title",
                                      "summary",
                                      "sections"
                                    ],
                                    "type": "object"
                                  },
                                  "provenance": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "graphBuild": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "graphHash": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "id": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "profile": {
                                                "type": "string"
                                              },
                                              "rulesVersion": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "graphHash",
                                              "rulesVersion",
                                              "profile"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "lock": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "approvalRef": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "authority": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              },
                                              "effectiveAt": {
                                                "format": "date-time",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                                "type": "string"
                                              },
                                              "lockedOn": {
                                                "format": "date",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                "type": "string"
                                              },
                                              "lockId": {
                                                "anyOf": [
                                                  {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "memberCount": {
                                                "anyOf": [
                                                  {
                                                    "maximum": 9007199254740991,
                                                    "minimum": 0,
                                                    "type": "integer"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "provenance": {
                                                "enum": [
                                                  "explicit",
                                                  "register_scope_lock_date",
                                                  "engagement_starts_on"
                                                ],
                                                "type": "string"
                                              },
                                              "reconstructed": {
                                                "type": "boolean"
                                              },
                                              "resolverVersion": {
                                                "type": "string"
                                              },
                                              "timeZone": {
                                                "type": "string"
                                              },
                                              "version": {
                                                "anyOf": [
                                                  {
                                                    "maximum": 9007199254740991,
                                                    "minimum": 1,
                                                    "type": "integer"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "lockId",
                                              "version",
                                              "lockedOn",
                                              "effectiveAt",
                                              "timeZone",
                                              "provenance",
                                              "reconstructed",
                                              "authority",
                                              "approvalRef",
                                              "memberCount",
                                              "resolverVersion"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "lock",
                                      "graphBuild"
                                    ],
                                    "type": "object"
                                  },
                                  "version": {
                                    "const": 1,
                                    "type": "number"
                                  },
                                  "watermark": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "version",
                                  "kind",
                                  "draft",
                                  "watermark",
                                  "case",
                                  "flags",
                                  "notes",
                                  "custody",
                                  "claims",
                                  "prose",
                                  "engine",
                                  "generatedAt"
                                ],
                                "type": "object"
                              },
                              "status": {
                                "enum": [
                                  "draft",
                                  "final"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "caseId",
                              "kind",
                              "status",
                              "contentHash",
                              "createdAt",
                              "snapshot"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "investment": {
                          "additionalProperties": false,
                          "properties": {
                            "cloudCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "coordinationCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "coordinationPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "costEvidence": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cloudLines": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "linkedTimeEntries": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "timeEntries": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "timeEntries",
                                    "linkedTimeEntries",
                                    "cloudLines"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "currencyConflict": {
                              "default": false,
                              "type": "boolean"
                            },
                            "estimated": {
                              "default": false,
                              "type": "boolean"
                            },
                            "estimatedCloudCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "invoicedCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourCategories": {
                              "anyOf": [
                                {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "category": {
                                        "enum": [
                                          "feature",
                                          "bug",
                                          "other_linked",
                                          "unlinked"
                                        ],
                                        "type": "string"
                                      },
                                      "cents": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "hours": {
                                        "minimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "category",
                                      "cents",
                                      "hours"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "labourHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "reworkCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reworkPct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "roleBandHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "scopeCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scopePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "totalCents": {
                              "anyOf": [
                                {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "unpricedHours": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "totalCents",
                            "labourCents",
                            "labourHours",
                            "unpricedHours",
                            "roleBandHours",
                            "cloudCents",
                            "estimatedCloudCents",
                            "estimated",
                            "invoicedCents",
                            "coordinationCents",
                            "coordinationPct",
                            "scopeCents",
                            "scopePct",
                            "reworkCents",
                            "reworkPct",
                            "labourCategories",
                            "currencyConflict",
                            "costEvidence"
                          ],
                          "type": "object"
                        },
                        "manualEntrySharePct": {
                          "anyOf": [
                            {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "periodEnd": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "periodStart": {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        "scope": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "addedCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "addedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "grownCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "grownItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "priced": {
                                  "type": "boolean"
                                },
                                "reopenedCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "reopenedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "scopeLockOn": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "totalCents": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "unestimated": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "scopeLockOn",
                                "totalCents",
                                "priced",
                                "addedItems",
                                "addedCents",
                                "reopenedItems",
                                "reopenedCents",
                                "grownItems",
                                "grownCents",
                                "unestimated",
                                "blendedHourlyRateCents"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sources": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "label": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "projectRows": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "reason": {
                                "enum": [
                                  "no_activity",
                                  "unattributed",
                                  "empty"
                                ],
                                "type": "string"
                              },
                              "source": {
                                "enum": [
                                  "commercial",
                                  "tracker",
                                  "code",
                                  "release",
                                  "calendar"
                                ],
                                "type": "string"
                              },
                              "state": {
                                "enum": [
                                  "data_present",
                                  "not_connected",
                                  "no_data"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "source",
                              "state",
                              "label"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "currency",
                        "delivery",
                        "investment",
                        "scope",
                        "coordination",
                        "ai",
                        "aiInsufficientSample",
                        "confidence",
                        "sources",
                        "manualEntrySharePct",
                        "assumptions",
                        "actions",
                        "evidencePackages"
                      ],
                      "type": "object"
                    },
                    "narratives": {
                      "additionalProperties": false,
                      "properties": {
                        "default": {
                          "type": "string"
                        },
                        "executive": {
                          "type": "string"
                        },
                        "friendly": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "default",
                        "executive",
                        "friendly"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "facts",
                    "narratives",
                    "engine",
                    "agencyName"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read deterministic report facts and template tones",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder/narrative": {
      "post": {
        "description": "Generate one optional synchronous slotted narrative with the existing model allowlist, current monthly AI allowance and reservation ledger. Provider absence, budget denial or unusable output returns truthful template provenance. Durable request identity prevents another billable dispatch; stored result reconciliation recovers interrupted acknowledgement. An unresolved external outcome stays pending. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.narrative",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-reports.narrative",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "clientName": "Synthetic customer",
                    "end": "2026-03-31",
                    "period": "Q1 2026",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "projectName": "Synthetic delivery",
                    "start": "2026-01-01",
                    "tone": "default"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientName": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "end": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "period": {
                    "maxLength": 80,
                    "minLength": 1,
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "projectName": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "start": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "tone": {
                    "enum": [
                      "default",
                      "executive",
                      "friendly"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "projectId",
                  "start",
                  "end",
                  "tone",
                  "clientName",
                  "projectName",
                  "period"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "engine": "template",
                      "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                      "provenance": {
                        "modelId": null,
                        "outcome": "template",
                        "promptVersion": null,
                        "provider": null
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "engine": {
                      "enum": [
                        "template",
                        "claude",
                        "openai"
                      ],
                      "type": "string"
                    },
                    "narrative": {
                      "type": "string"
                    },
                    "provenance": {
                      "additionalProperties": false,
                      "properties": {
                        "modelId": {
                          "anyOf": [
                            {
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outcome": {
                          "enum": [
                            "template",
                            "generated"
                          ],
                          "type": "string"
                        },
                        "promptVersion": {
                          "anyOf": [
                            {
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "provider": {
                          "anyOf": [
                            {
                              "enum": [
                                "openai",
                                "anthropic"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "outcome",
                        "provider",
                        "modelId",
                        "promptVersion"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "narrative",
                    "engine"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Generate optional guarded report prose",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.create",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "external",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/report-builder/preview": {
      "post": {
        "description": "Build deterministic document facts and escaped rendered HTML from a complete composition. Current project/client ownership and plan window apply before generation. Preview is synchronous and does not save a report, create a share or send a message. Current key scopes, creator actions, plan and tenant/project restrictions apply on every call and successful replay. Money precision, confidence and sample thresholds use the existing factual model.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nComposition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.\n\nOrdered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.\n\nMonthly shipment quota and AI token allowance are separate from technical traffic limits.\n\nAll responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.\n\nSharing, report deletion and email/Slack/Teams distribution remain unavailable.",
        "operationId": "reports.preview",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-reports.preview",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "composition": {
                      "context": {
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "clientName": "Synthetic customer",
                        "period": "Q1 2026",
                        "periodEnd": "2026-03-31",
                        "periodStart": "2026-01-01",
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "projectName": "Synthetic delivery",
                        "qid": null,
                        "timeRange": "Jan 1–Mar 31"
                      },
                      "items": {},
                      "layout": {
                        "order": [
                          "rs1",
                          "rs2",
                          "rs3",
                          "rs4",
                          "rs5",
                          "rs6",
                          "rs7",
                          "rs8",
                          "rs9",
                          "rs10"
                        ],
                        "sections": {
                          "rs1": true,
                          "rs10": true,
                          "rs2": true,
                          "rs3": true,
                          "rs4": true,
                          "rs5": true,
                          "rs6": true,
                          "rs7": false,
                          "rs8": true,
                          "rs9": true
                        }
                      },
                      "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                      "narrativeProvenance": {
                        "modelId": null,
                        "outcome": "template",
                        "promptVersion": null,
                        "provider": null
                      },
                      "tone": "default"
                    }
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "composition": {
                    "properties": {
                      "context": {
                        "properties": {
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "clientName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "period": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "periodEnd": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "periodStart": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "projectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "projectName": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "qid": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "timeRange": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "clientId",
                          "clientName",
                          "projectId",
                          "projectName",
                          "periodStart",
                          "periodEnd",
                          "period",
                          "timeRange",
                          "qid"
                        ],
                        "type": "object"
                      },
                      "invoiceNarratives": {
                        "additionalProperties": {
                          "maxLength": 20000,
                          "type": "string"
                        },
                        "propertyNames": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "items": {
                        "properties": {
                          "ai": {
                            "additionalProperties": {
                              "type": "boolean"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "forensics": {
                            "additionalProperties": {
                              "type": "boolean"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "invoice": {
                            "additionalProperties": {
                              "additionalProperties": {
                                "type": "boolean"
                              },
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "layout": {
                        "properties": {
                          "order": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "sections": {
                            "anyOf": [
                              {
                                "additionalProperties": {
                                  "type": "boolean"
                                },
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "order",
                          "sections"
                        ],
                        "type": "object"
                      },
                      "narrative": {
                        "maxLength": 20000,
                        "type": "string"
                      },
                      "narrativeProvenance": {
                        "properties": {
                          "modelId": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "outcome": {
                            "enum": [
                              "template",
                              "generated"
                            ],
                            "type": "string"
                          },
                          "promptVersion": {
                            "anyOf": [
                              {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "provider": {
                            "anyOf": [
                              {
                                "enum": [
                                  "openai",
                                  "anthropic"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "outcome",
                          "provider",
                          "modelId",
                          "promptVersion"
                        ],
                        "type": "object"
                      },
                      "tone": {
                        "enum": [
                          "default",
                          "executive",
                          "friendly",
                          "custom"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "context",
                      "layout",
                      "items",
                      "narrative",
                      "tone"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "composition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL report workflow",
                    "value": {
                      "document": {
                        "agencyName": "Example report workspace",
                        "branded": false,
                        "composition": {
                          "context": {
                            "clientId": "22222222-2222-4222-8222-222222222222",
                            "clientName": "example-reports Retail",
                            "period": "Q1 2026",
                            "periodEnd": "2026-03-31",
                            "periodStart": "2026-01-01",
                            "projectId": "11111111-1111-4111-8111-111111111111",
                            "projectName": "example-reports Checkout Replatform",
                            "qid": null,
                            "timeRange": "Jan 1–Mar 31"
                          },
                          "items": {},
                          "layout": {
                            "order": [
                              "rs1",
                              "rs2",
                              "rs3",
                              "rs4",
                              "rs5",
                              "rs6",
                              "rs7",
                              "rs8",
                              "rs9",
                              "rs10"
                            ],
                            "sections": {
                              "rs1": true,
                              "rs10": true,
                              "rs2": true,
                              "rs3": true,
                              "rs4": true,
                              "rs5": true,
                              "rs6": true,
                              "rs7": false,
                              "rs8": true,
                              "rs9": true
                            }
                          },
                          "narrative": "During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.",
                          "narrativeProvenance": {
                            "modelId": null,
                            "outcome": "template",
                            "promptVersion": null,
                            "provider": null
                          },
                          "tone": "default"
                        },
                        "facts": {
                          "actions": [
                            {
                              "action": "Review added items with the client and formalize the next-cycle scope.",
                              "n": 1,
                              "tag": "Margin",
                              "title": "Convert scope expansion into a change request",
                              "tone": "amber",
                              "why": "$6,600 of estimated delivery investment came from work added after scope lock."
                            },
                            {
                              "action": "Create a dedicated discovery / clarification budget bucket.",
                              "n": 2,
                              "tag": "Process",
                              "title": "Separate discovery from implementation budget",
                              "tone": "blue",
                              "why": "1 meetings (1 h) were attributed to this project."
                            },
                            {
                              "action": "Require ticket IDs in branch names and PR titles.",
                              "n": 3,
                              "tag": "Data",
                              "title": "Improve ticket-to-PR traceability",
                              "tone": "neutral",
                              "why": "0% of PRs were not linked to tickets."
                            },
                            {
                              "action": "Add an AI-assisted field or label to relevant work items.",
                              "n": 4,
                              "tag": "AI",
                              "title": "Track AI-assisted work explicitly",
                              "tone": "purple",
                              "why": "AI-assisted delivery cannot be measured until assisted work is tagged."
                            },
                            {
                              "action": "Use the executive summary and scope expansion sections in the next QBR or invoice discussion.",
                              "n": 5,
                              "tag": "Client",
                              "title": "Use this report in the next client review",
                              "tone": "green",
                              "why": "The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions."
                            }
                          ],
                          "ai": null,
                          "aiInsufficientSample": null,
                          "assumptions": [
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "cost-basis",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Cost estimate basis",
                              "unitOrMethod": "person_then_role",
                              "value": "$150/h",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "scope-baseline",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Scope baseline",
                              "unitOrMethod": "engagement_start",
                              "value": "1 work items",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "meeting-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Meeting attribution",
                              "unitOrMethod": "project_tagged",
                              "value": "100% tagged",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "ai-attribution",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "AI attribution",
                              "unitOrMethod": "self_reported",
                              "value": "Self-reported labels and trailers",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "reporting-period",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Reporting period",
                              "unitOrMethod": "active_range",
                              "value": "Jan 1 – Mar 31, 2026",
                              "versionId": null
                            },
                            {
                              "effectiveFrom": "2026-01-01",
                              "effectiveTo": null,
                              "id": "work-cost-allocation",
                              "source": "default",
                              "status": "needs_verification",
                              "title": "Work-item cost allocation",
                              "unitOrMethod": "not_allocated",
                              "value": "Team estimate only",
                              "versionId": null
                            }
                          ],
                          "confidence": {
                            "hints": [
                              "Tag calendar events with the client or project.",
                              "Add person-level rates for worked hours; role rates remain partial.",
                              "Explicitly mark AI-assisted merged work with labels or commit trailers.",
                              "Reconnect or sync sources so their latest successful data is current.",
                              "Confirm or rectify the reporting assumptions used for this period.",
                              "Connect deployment evidence to completed work items."
                            ],
                            "label": "Medium",
                            "score": 80,
                            "signals": [
                              {
                                "contribution": 29.63,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 2,
                                  "query": "Merged code changes linked to normalized work items in the report period."
                                },
                                "id": "prs_linked",
                                "label": "PRs linked to tickets",
                                "note": "Linked merged changes",
                                "pct": 100,
                                "weight": 16
                              },
                              {
                                "contribution": 25.93,
                                "evidence": {
                                  "denominator": 3,
                                  "numerator": 3,
                                  "query": "Workspace work items in the report period with a normalized project mapping."
                                },
                                "id": "items_mapped",
                                "label": "Tickets mapped to client / project",
                                "note": "Workspace mapping coverage",
                                "pct": 100,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "An active Google Calendar connection is required before calendar tagging is measured."
                                },
                                "id": "meetings_tagged",
                                "label": "Meetings tagged to client / project",
                                "note": "No active calendar source",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Project time entries priced by person-level rates (100%) or role-level rates (60%)."
                                },
                                "id": "rate_card",
                                "label": "Rate card precision",
                                "note": "No labour hours in this period",
                                "pct": null,
                                "weight": 14
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": null,
                                  "numerator": null,
                                  "query": "Explicit self-reported AI labels or commit trailers on merged changes."
                                },
                                "id": "ai_tagging",
                                "label": "AI-assisted work tagging",
                                "note": "Not tagged",
                                "pct": null,
                                "weight": 12
                              },
                              {
                                "contribution": 9.26,
                                "evidence": {
                                  "denominator": 2,
                                  "numerator": 1,
                                  "query": "Completed project work items linked to a merged change and a release through explicit evidence links."
                                },
                                "id": "release_evidence",
                                "label": "Release / deployment evidence",
                                "note": "Completed work with linked release evidence",
                                "pct": 50,
                                "weight": 10
                              },
                              {
                                "contribution": 14.81,
                                "evidence": {
                                  "denominator": 100,
                                  "numerator": 100,
                                  "query": "Synced rather than manual or CSV evidence rows in the report context."
                                },
                                "id": "manual_entry_share",
                                "label": "Synced evidence share",
                                "note": "Synced evidence coverage",
                                "pct": 100,
                                "weight": 8
                              },
                              {
                                "contribution": null,
                                "evidence": {
                                  "denominator": 0,
                                  "numerator": 0,
                                  "query": "Latest successful sync per active connection, measured against the report period end."
                                },
                                "id": "freshness",
                                "label": "Source freshness",
                                "note": "No active sources",
                                "pct": null,
                                "weight": 8
                              },
                              {
                                "contribution": 0,
                                "evidence": {
                                  "denominator": 6,
                                  "numerator": 0,
                                  "query": "Resolved confirmed or rectified report assumptions at the workspace, client, project, and reporting-period scope."
                                },
                                "id": "assumptions",
                                "label": "Confirmed reporting assumptions",
                                "note": "0 of 6 reporting assumptions are confirmed or rectified for this period.",
                                "pct": 0,
                                "weight": 6
                              }
                            ]
                          },
                          "coordination": {
                            "blendedHourlyRateCents": 15000,
                            "costCents": 15000,
                            "declined": 0,
                            "hours": 1,
                            "meetings": 1,
                            "taggingPct": 100
                          },
                          "currency": "USD",
                          "delivery": {
                            "completedItems": 2,
                            "mergedChanges": 2,
                            "milestones": 0,
                            "objectivesCompleted": 0,
                            "objectivesTotal": 0,
                            "prsLinkedPct": 100,
                            "releaseRows": [
                              {
                                "items": 1,
                                "name": "v1.4.0",
                                "releasedAt": "2026-02-12T18:00:00.000Z",
                                "releaseId": "00000000-0000-4000-8000-000000000007"
                              }
                            ],
                            "releases": 1,
                            "rows": [
                              {
                                "completedAt": "2026-03-01T10:00:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-42",
                                "linkedChanges": 1,
                                "title": "Refunds fail for split tender",
                                "type": "bug",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000005"
                              },
                              {
                                "completedAt": "2026-02-10T16:30:00.000Z",
                                "externalKey": "EXAMPLE-REPORTS-1",
                                "linkedChanges": 1,
                                "title": "Card vault migration",
                                "type": "story",
                                "url": null,
                                "workItemId": "00000000-0000-4000-8000-000000000006"
                              }
                            ]
                          },
                          "evidencePackages": [],
                          "investment": {
                            "cloudCents": 0,
                            "coordinationCents": 15000,
                            "coordinationPct": null,
                            "costEvidence": {
                              "cloudLines": 0,
                              "linkedTimeEntries": 0,
                              "timeEntries": 0
                            },
                            "currencyConflict": false,
                            "estimated": false,
                            "estimatedCloudCents": 0,
                            "invoicedCents": null,
                            "labourCategories": [],
                            "labourCents": 0,
                            "labourHours": 0,
                            "reworkCents": 0,
                            "reworkPct": null,
                            "roleBandHours": 0,
                            "scopeCents": 660000,
                            "scopePct": null,
                            "totalCents": null,
                            "unpricedHours": 0
                          },
                          "manualEntrySharePct": 0,
                          "periodEnd": "2026-03-31",
                          "periodStart": "2026-01-01",
                          "scope": {
                            "addedCents": 660000,
                            "addedItems": 2,
                            "blendedHourlyRateCents": 15000,
                            "grownCents": 0,
                            "grownItems": 0,
                            "priced": true,
                            "reopenedCents": 0,
                            "reopenedItems": 0,
                            "scopeLockOn": "2026-01-01",
                            "totalCents": 660000,
                            "unestimated": 0
                          },
                          "sources": [
                            {
                              "label": "Contracts",
                              "source": "commercial",
                              "state": "data_present"
                            },
                            {
                              "label": "Tracker",
                              "source": "tracker",
                              "state": "data_present"
                            },
                            {
                              "label": "Code",
                              "source": "code",
                              "state": "data_present"
                            },
                            {
                              "label": "Releases",
                              "source": "release",
                              "state": "data_present"
                            },
                            {
                              "label": "Calendar",
                              "source": "calendar",
                              "state": "data_present"
                            }
                          ]
                        },
                        "generatedAt": "2026-10-01T08:30:28.625Z",
                        "teamType": null,
                        "version": 1
                      },
                      "html": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<title>example-reports Retail — example-reports Checkout Replatform · Q1 2026</title>\n<meta name=\"scopeworth:question-category\" content=\"Invoice\" />\n<style>\n  :root{\n    --navy:#0F172A; --charcoal:#1E293B; --bg:#F8FAFC; --card:#FFFFFF; --border:#E2E8F0;\n    --muted:#64748B; --slate:#CBD5E1; --blue:#2563EB; --teal:#14B8A6; --green:#10B981;\n    --amber:#F59E0B; --red:#EF4444; --ink:#0F172A; --subtle:#F1F5F9;\n  }\n  *{box-sizing:border-box}\n  html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);}\n  body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased;font-feature-settings:\"ss01\",\"cv11\";}\n  .num{font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\"}\n  .mono{font-family:'JetBrains Mono',ui-monospace,Menlo,Consolas,monospace}\n  .report{max-width:840px;margin:0 auto;padding:24px 16px 80px;}\n  .report-page{background:var(--card);border:1px solid var(--border);border-radius:14px;margin-bottom:28px;padding:56px 64px;box-shadow:0 1px 0 rgba(15,23,42,0.02), 0 8px 24px -16px rgba(15,23,42,0.10);position:relative;overflow:hidden;}\n  .page-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;margin-bottom:32px;border-bottom:1px solid var(--border);font-size:11px;color:var(--muted);letter-spacing:0.06em;text-transform:uppercase;font-weight:500;}\n  .page-header .brand{display:flex;align-items:center;gap:8px;color:var(--ink);font-weight:600;letter-spacing:0.02em;text-transform:none;font-size:12px}\n  .page-header .brand svg{height:22.5px;width:auto;display:block}\n  .page-header .crumb{display:flex;gap:10px;align-items:center}\n  .page-header .crumb .dot{width:3px;height:3px;border-radius:50%;background:var(--slate)}\n  .page-num{font-variant-numeric:tabular-nums}\n  .logo-wordmark{height:26px;width:auto;display:block}\n  h1,h2,h3,h4{margin:0;color:var(--ink);letter-spacing:-0.01em}\n  h1{font-size:34px;font-weight:700;line-height:1.15;letter-spacing:-0.02em}\n  h2{font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-0.015em}\n  h3{font-size:16px;font-weight:600}\n  h4{font-size:13px;font-weight:600;color:var(--charcoal)}\n  p{margin:0 0 12px}\n  .eyebrow{font-size:11px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--blue);}\n  .muted{color:var(--muted)}\n  .lead{font-size:15px;line-height:1.65;color:var(--charcoal)}\n  .section-title{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px;}\n  .section-title h2{flex:1}\n  .section-title .meta{font-size:12px;color:var(--muted);white-space:nowrap}\n  .grid{display:grid;gap:16px}\n  .grid-2{grid-template-columns:repeat(2,1fr)}\n  .grid-3{grid-template-columns:repeat(3,1fr)}\n  .grid-4{grid-template-columns:repeat(4,1fr)}\n  .card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:20px;}\n  .card.tight{padding:16px}\n  .card .label{font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}\n  .card .value{font-size:28px;font-weight:700;line-height:1.1;letter-spacing:-0.02em}\n  .card .sub{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}\n  .kpi{border:1px solid var(--border);border-radius:10px;padding:18px;background:var(--card);position:relative;}\n  .kpi .label{font-size:11px;letter-spacing:0.1em;text-transform:uppercase;font-weight:600;color:var(--muted);margin-bottom:10px}\n  .kpi .value{font-size:30px;font-weight:700;letter-spacing:-0.02em;line-height:1}\n  .kpi .value .unit{font-size:16px;font-weight:600;color:var(--muted);margin-left:4px}\n  .kpi ul{margin:14px 0 0;padding:0;list-style:none;border-top:1px dashed var(--border);padding-top:12px}\n  .kpi ul li{display:flex;justify-content:space-between;font-size:12px;color:var(--charcoal);padding:3px 0}\n  .kpi ul li .v{font-weight:600;font-variant-numeric:tabular-nums}\n  .kpi.accent-blue{box-shadow:inset 3px 0 0 var(--blue)}\n  .kpi.accent-teal{box-shadow:inset 3px 0 0 var(--teal)}\n  .kpi.accent-amber{box-shadow:inset 3px 0 0 var(--amber)}\n  .kpi.accent-green{box-shadow:inset 3px 0 0 var(--green)}\n  .kpi.accent-red{box-shadow:inset 3px 0 0 var(--red)}\n  .chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:500;background:var(--subtle);color:var(--charcoal);border:1px solid var(--border);}\n  .chip .dot{width:6px;height:6px;border-radius:50%;background:var(--slate)}\n  .chip.green{background:rgba(16,185,129,.08);color:#047857;border-color:rgba(16,185,129,.25)}\n  .chip.green .dot{background:var(--green)}\n  .chip.amber{background:rgba(245,158,11,.08);color:#92400e;border-color:rgba(245,158,11,.25)}\n  .chip.amber .dot{background:var(--amber)}\n  .chip.red{background:rgba(239,68,68,.08);color:#991b1b;border-color:rgba(239,68,68,.25)}\n  .chip.red .dot{background:var(--red)}\n  .chip.blue{background:rgba(37,99,235,.08);color:#1d4ed8;border-color:rgba(37,99,235,.25)}\n  .chip.blue .dot{background:var(--blue)}\n  table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;border:1px solid var(--border);border-radius:10px;overflow:hidden;}\n  thead th{background:var(--subtle);text-align:left;font-weight:600;font-size:11px;letter-spacing:0.08em;text-transform:uppercase;color:var(--muted);padding:10px 14px;border-bottom:1px solid var(--border);}\n  tbody td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:top;}\n  tbody tr:last-child td{border-bottom:none}\n  td.num, th.num{text-align:right;font-variant-numeric:tabular-nums}\n  td .row-title{font-weight:600;color:var(--ink)}\n  td .row-sub{color:var(--muted);font-size:12px;margin-top:2px}\n  .callout{background:linear-gradient(180deg,#F8FAFF 0%, #F1F5F9 100%);border:1px solid var(--border);border-left:3px solid var(--blue);padding:16px 18px;border-radius:8px;font-size:13px;color:var(--charcoal);}\n  .callout strong{color:var(--ink)}\n  .callout.amber{border-left-color:var(--amber);background:linear-gradient(180deg,#FFFBF1 0%, #FEF3C7 5%, #FFFBEB 100%)}\n  .callout.green{border-left-color:var(--green);background:linear-gradient(180deg,#F0FDF7 0%, #ECFDF5 100%)}\n  .bar-row{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:10px}\n  .bar-track{position:relative;height:10px;border-radius:6px;background:var(--subtle);overflow:hidden;border:1px solid var(--border);}\n  .bar-fill{position:absolute;inset:0 auto 0 0;background:var(--blue);border-radius:6px}\n  .bar-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--charcoal)}\n  .bar-meta .name{font-weight:500}\n  .bar-meta .v{font-variant-numeric:tabular-nums;color:var(--muted)}\n  .stack{display:flex;height:14px;border-radius:8px;overflow:hidden;border:1px solid var(--border);background:var(--subtle);}\n  .stack > div{height:100%}\n  .stack-legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:14px}\n  .stack-legend .item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--charcoal)}\n  .stack-legend .sw{width:10px;height:10px;border-radius:3px}\n  .cover{padding:0;overflow:hidden;border:1px solid var(--border);}\n  .cover-inner{background:radial-gradient(1200px 500px at 110% -10%, rgba(37,99,235,.35), transparent 55%),radial-gradient(900px 400px at -10% 110%, rgba(20,184,166,.22), transparent 55%),linear-gradient(180deg,#0B1224 0%,#0F172A 60%,#0B1020 100%);color:#E2E8F0;padding:64px 64px 56px;min-height:980px;display:flex;flex-direction:column;justify-content:space-between;position:relative;}\n  .cover-top{display:flex;align-items:center;justify-content:space-between;color:#CBD5E1;position:relative;z-index:1}\n  .cover-top .brand{display:flex;align-items:center;gap:10px;font-weight:600;letter-spacing:0.04em;color:#F8FAFC}\n  .cover-top .brand svg{height:30px;width:auto}\n  .cover-meta{font-size:11px;letter-spacing:0.14em;text-transform:uppercase;color:#94A3B8}\n  .cover-headline{margin-top:48px;max-width:560px;position:relative;z-index:1}\n  .cover-headline .eyebrow{color:#7DD3FC;font-weight:600}\n  .cover-headline h1{color:#F8FAFC;font-size:54px;line-height:1.05;letter-spacing:-0.025em;margin:14px 0 16px;font-weight:700;}\n  .cover-headline .tag{color:#CBD5E1;font-size:18px;line-height:1.5;max-width:520px}\n  .cover-graphic{position:absolute;right:-60px;top:200px;width:440px;height:480px;opacity:.55;pointer-events:none;z-index:0;}\n  .cover-meta-grid{margin-top:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:24px;padding-top:36px;border-top:1px solid rgba(203,213,225,.18);position:relative;z-index:1;}\n  .cover-meta-grid .m-label{font-size:10px;letter-spacing:0.16em;text-transform:uppercase;color:#94A3B8;margin-bottom:6px}\n  .cover-meta-grid .m-value{font-size:14px;color:#F8FAFC;font-weight:500;line-height:1.4}\n  .cover-footer{display:flex;justify-content:space-between;align-items:center;margin-top:28px;font-size:11px;color:#94A3B8;position:relative;z-index:1;}\n  .cover-note{font-size:11px;color:#94A3B8;max-width:420px;line-height:1.5;}\n  .integration-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}\n  .int-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:rgba(248,250,252,.06);border:1px solid rgba(203,213,225,.18);color:#E2E8F0;font-size:11px;font-weight:500;}\n  .int-badge .b-dot{width:6px;height:6px;border-radius:50%;background:#7DD3FC}\n  .equation{display:flex;align-items:center;justify-content:center;gap:16px;padding:22px;background:var(--subtle);border:1px solid var(--border);border-radius:10px;font-variant-numeric:tabular-nums;}\n  .eq-num{font-size:28px;font-weight:700;color:var(--ink);letter-spacing:-0.02em}\n  .eq-op{font-size:22px;color:var(--muted);font-weight:500}\n  .eq-label{font-size:11px;color:var(--muted);letter-spacing:0.08em;text-transform:uppercase;font-weight:600;margin-top:4px;text-align:center}\n  .eq-cell{display:flex;flex-direction:column;align-items:center;min-width:120px}\n  .eq-cell.gain .eq-num{color:#047857}\n  .conf-head{display:flex;align-items:center;gap:18px;margin-bottom:18px}\n  .conf-ring{width:96px;height:96px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;position:relative;}\n  .conf-ring::after{content:\"\";position:absolute;inset:8px;background:var(--card);border-radius:50%;}\n  .conf-ring .v{position:relative;z-index:1;font-size:20px;font-weight:700;letter-spacing:-0.02em}\n  .conf-ring .v small{font-size:11px;font-weight:500;color:var(--muted);display:block;text-align:center;letter-spacing:0.08em;text-transform:uppercase}\n  .rec-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}\n  .rec-card{border:1px solid var(--border);border-radius:10px;padding:18px;background:var(--card);display:flex;flex-direction:column;gap:8px;}\n  .rec-card .rc-num{width:24px;height:24px;border-radius:6px;background:var(--ink);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;}\n  .rec-card h4{font-size:14px}\n  .rec-card .rc-row{font-size:12px;color:var(--charcoal)}\n  .rec-card .rc-row b{color:var(--muted);font-weight:600;letter-spacing:0.06em;text-transform:uppercase;font-size:10px;display:block;margin-bottom:2px}\n  .footer-strip{display:flex;justify-content:space-between;align-items:end;padding-top:24px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);}\n  .footer-strip .links{display:flex;gap:14px}\n  .made-with{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 auto;padding:14px 18px;max-width:840px;font-size:12px;color:var(--muted);letter-spacing:0.04em}\n  .made-with svg{height:18px;width:auto}\n  .mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}\n  .mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}\n  .mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}\n  .page-label{position:absolute;top:18px;right:24px;font-size:10px;letter-spacing:0.14em;text-transform:uppercase;color:var(--muted);font-weight:500;}\n  @media (max-width:780px){\n    .report-page{padding:36px 24px}\n    .grid-4{grid-template-columns:repeat(2,1fr)}\n    .grid-3{grid-template-columns:1fr}\n    .rec-grid{grid-template-columns:1fr}\n    .cover-inner{padding:36px 28px;min-height:auto}\n    .cover-headline h1{font-size:36px}\n    .cover-meta-grid{grid-template-columns:repeat(2,1fr)}\n    .cover-graphic{display:none}\n  }\n  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }\n  @media print{\n    @page { size: A4; margin: 14mm 14mm 16mm; }\n    @page :first { margin: 0; }\n    *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }\n    html,body{background:#fff}\n    .report{max-width:none;margin:0;padding:0}\n    .report-page{border:none;border-radius:0;box-shadow:none;margin:0;padding:0 0 12mm;page-break-after:always;break-after:page;}\n    .report-page:last-child{page-break-after:auto}\n    .cover{padding:0;background:#0F172A;overflow:hidden}\n    .cover-inner{min-height:auto;padding:32mm 18mm 28mm}\n    .avoid-break, .kpi, .card, table, .callout, .rec-card, .equation, .conf-head{break-inside:avoid;page-break-inside:avoid;}\n    h2,h3{break-after:avoid;page-break-after:avoid}\n    a{color:var(--ink);text-decoration:none}\n    .page-label{display:none}\n  }\n</style>\n</head>\n<body>\n<main class=\"report\" role=\"main\">\n<section class=\"report-page cover\" aria-labelledby=\"cover-title\"><div class=\"cover-inner\">\n    <header class=\"cover-top\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#F8FAFC\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#F8FAFC\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#60A5FA\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#2DD4BF\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#F8FAFC\">Scopeworth</text></svg></div><div class=\"cover-meta num\">Q1 2026 · Client report</div></header>\n    <svg class=\"cover-graphic\" viewBox=\"0 0 520 560\" aria-hidden=\"true\"><defs><linearGradient id=\"paper\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#1E293B\" stop-opacity=\".95\"/><stop offset=\"1\" stop-color=\"#0F172A\" stop-opacity=\".7\"/></linearGradient><linearGradient id=\"line\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"0\"><stop offset=\"0\" stop-color=\"#7DD3FC\" stop-opacity=\"0\"/><stop offset=\".5\" stop-color=\"#7DD3FC\" stop-opacity=\".9\"/><stop offset=\"1\" stop-color=\"#5EEAD4\" stop-opacity=\"0\"/></linearGradient></defs><g transform=\"translate(120 60) rotate(-6)\"><rect width=\"320\" height=\"420\" rx=\"14\" fill=\"url(#paper)\" stroke=\"rgba(125,211,252,.18)\"/><rect x=\"24\" y=\"28\" width=\"120\" height=\"10\" rx=\"2\" fill=\"#7DD3FC\" opacity=\".8\"/><rect x=\"24\" y=\"48\" width=\"220\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".5\"/><rect x=\"24\" y=\"60\" width=\"180\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".5\"/><rect x=\"24\" y=\"92\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(37,99,235,.18)\" stroke=\"rgba(125,211,252,.25)\"/><rect x=\"24\" y=\"186\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(20,184,166,.14)\" stroke=\"rgba(94,234,212,.25)\"/><rect x=\"24\" y=\"280\" width=\"272\" height=\"78\" rx=\"6\" fill=\"rgba(245,158,11,.10)\" stroke=\"rgba(245,158,11,.25)\"/></g><g transform=\"translate(80 110) rotate(-2)\"><rect width=\"320\" height=\"420\" rx=\"14\" fill=\"url(#paper)\" stroke=\"rgba(125,211,252,.22)\"/><rect x=\"24\" y=\"28\" width=\"160\" height=\"12\" rx=\"3\" fill=\"#F8FAFC\" opacity=\".95\"/><rect x=\"24\" y=\"50\" width=\"240\" height=\"6\" rx=\"2\" fill=\"#94A3B8\" opacity=\".55\"/><g transform=\"translate(24 90)\"><rect width=\"272\" height=\"120\" rx=\"8\" fill=\"rgba(15,23,42,.6)\" stroke=\"rgba(125,211,252,.18)\"/><polyline points=\"14,90 50,72 86,80 122,52 158,60 194,38 230,46 258,28\" fill=\"none\" stroke=\"url(#line)\" stroke-width=\"2\"/><polyline points=\"14,100 50,92 86,96 122,84 158,88 194,76 230,80 258,70\" fill=\"none\" stroke=\"#5EEAD4\" stroke-opacity=\".55\" stroke-width=\"1.5\" stroke-dasharray=\"3 3\"/><g fill=\"#7DD3FC\"><circle cx=\"50\" cy=\"72\" r=\"2.5\"/><circle cx=\"122\" cy=\"52\" r=\"2.5\"/><circle cx=\"194\" cy=\"38\" r=\"2.5\"/><circle cx=\"258\" cy=\"28\" r=\"2.5\"/></g></g><g transform=\"translate(24 230)\"><rect width=\"272\" height=\"14\" rx=\"4\" fill=\"rgba(255,255,255,.08)\"/><rect width=\"174\" height=\"14\" rx=\"4\" fill=\"#2563EB\" opacity=\".85\"/><rect x=\"174\" width=\"26\" height=\"14\" fill=\"#14B8A6\" opacity=\".85\"/><rect x=\"200\" width=\"22\" height=\"14\" fill=\"#F59E0B\" opacity=\".85\"/><rect x=\"222\" width=\"36\" height=\"14\" rx=\"0\" fill=\"#EF4444\" opacity=\".55\"/><rect x=\"258\" width=\"14\" height=\"14\" rx=\"0\" fill=\"#94A3B8\" opacity=\".5\"/></g></g></svg>\n    <div class=\"cover-headline\"><div class=\"eyebrow\">Client SDLC ROI Report</div><h1 id=\"cover-title\">What changed,<br/>what shipped,<br/>and what it cost.</h1><p class=\"tag\">A client-ready summary of delivery value, scope movement, rework, coordination, and AI-assisted delivery economics — built from the signals already flowing through your tools.</p><div class=\"integration-row mt-24\"><span class=\"int-badge\"><span class=\"b-dot\"></span>Contracts</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Tracker</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Code</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Releases</span><span class=\"int-badge\"><span class=\"b-dot\"></span>Calendar</span></div></div>\n    <div class=\"cover-meta-grid\">\n      <div><div class=\"m-label\">Prepared by</div><div class=\"m-value\">Example report workspace</div></div>\n      <div><div class=\"m-label\">Client</div><div class=\"m-value\">example-reports Retail</div></div>\n      <div><div class=\"m-label\">Project</div><div class=\"m-value\">example-reports Checkout Replatform</div></div>\n      <div><div class=\"m-label\">Reporting period</div><div class=\"m-value\">Q1 2026</div></div>\n      <div><div class=\"m-label\">Generated on</div><div class=\"m-value\">1 October 2026</div></div>\n      <div><div class=\"m-label\">Report version</div><div class=\"m-value\">Snapshot · v1.0</div></div>\n    </div>\n    <div class=\"cover-footer\"><p class=\"cover-note\">This report was generated by Scopeworth from the delivery signals connected to this workspace. Every figure links back to tickets, pull requests, releases and calendar evidence.</p><span>scopeworth.app</span></div>\n  </div></section>\n<section class=\"report-page\" aria-labelledby=\"exec-title\"><span class=\"page-label\">01 · Executive summary</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">01 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Section one</div><h2 id=\"exec-title\">Executive summary</h2></div><div class=\"meta\">Period · Q1 2026</div></div>\n    <p class=\"lead\">During Q1 2026, Example report workspace delivered 2 work items, merged 2 PRs, and shipped 1 release for example-reports Retail on example-reports Checkout Replatform. Scope movement after the agreed baseline: 2 additional work items entered the cycle after lock, contributing an estimated $6,600 to the delivery investment. AI-assisted delivery is not yet measured — tag AI-assisted pull requests to unlock it. Report confidence is currently 80% — improving confirmed reporting assumptions can improve confidence next period.</p>\n    <div class=\"grid grid-4 mt-24\">\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">Delivered work</div><div class=\"value num\">2<span class=\"unit\">items</span></div><ul><li><span>Merged PRs</span><span class=\"v\">2</span></li><li><span>Releases</span><span class=\"v\">1</span></li><li><span>Milestones</span><span class=\"v\">0</span></li></ul></div>\n      <div class=\"kpi accent-teal avoid-break\"><div class=\"label\">Delivery investment</div><div class=\"value num\">—</div><ul><li><span>Coordination</span><span class=\"v num\">$150</span></li><li><span>Scope expansion</span><span class=\"v num\">$6,600</span></li><li><span>Rework</span><span class=\"v num\">$0</span></li></ul></div>\n      <div class=\"kpi accent-amber avoid-break\"><div class=\"label\">Scope expansion</div><div class=\"value num\">$6,600</div><ul><li><span>Items after scope lock</span><span class=\"v\">2</span></li><li><span>Reopened tickets</span><span class=\"v\">0</span></li><li><span>Margin risk</span><span class=\"v\">Unknown</span></li></ul></div>\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">AI delivery impact</div><div class=\"value num\" style=\"font-size:18px;line-height:1.25\">Not yet measured</div><ul><li><span>Tag AI-assisted PRs</span><span class=\"v\">to unlock</span></li></ul></div>\n    </div>\n    <div class=\"callout amber mt-24 avoid-break\" style=\"padding:18px 20px\"><div style=\"display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap\"><div style=\"flex:1;min-width:280px\"><div style=\"display:flex;align-items:center;gap:8px;margin-bottom:6px\"><span style=\"display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:rgba(245,158,11,.16);color:#92400e;font-size:11px;font-weight:700\">!</span><strong style=\"font-size:14px;color:var(--ink);letter-spacing:-0.005em\">Recommended commercial action</strong></div><div style=\"font-size:13px;line-height:1.55;color:var(--charcoal)\">Discuss scope expansion before the next reporting cycle and convert recurring unplanned work into a change request or retainer adjustment.</div></div><div style=\"display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none\"><div style=\"display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid rgba(245,158,11,.35);border-radius:999px;padding:6px 12px 6px 8px\"><span style=\"width:8px;height:8px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 2px #fff;display:inline-block\"></span><span style=\"font-size:11px;font-weight:600;color:#92400e;letter-spacing:.04em;text-transform:uppercase\">Action this cycle</span></div><span style=\"font-size:11px;color:var(--muted)\">Owner · Delivery lead · due before next QBR</span></div></div></div>\n    <div class=\"grid grid-3 mt-24\">\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">What shipped</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">Refunds fail for split tender, Card vault migration</p></div>\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">What changed</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">2 items added after scope lock; 0 tickets reopened; 1h of attributed coordination.</p></div>\n      <div class=\"card tight avoid-break\"><div class=\"label\" style=\"font-size:10px;letter-spacing:.1em;color:var(--muted);font-weight:600;text-transform:uppercase\">Needs attention</div><p style=\"margin:6px 0 0;font-size:13px;color:var(--charcoal)\">Ticket-to-PR linkage at 100%, meeting tagging at 100%, and explicit AI-assisted work tagging.</p></div>\n    </div></section>\n<section class=\"report-page\" aria-labelledby=\"ship-title\"><span class=\"page-label\">02 · What shipped</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">02 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Delivered work</div><h2 id=\"ship-title\">What shipped</h2></div><div class=\"meta\">Linked to tickets, PRs, and releases</div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Completed work items</div><div class=\"value num\">2</div><div class=\"sub\">Across feature, fix, and platform</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Merged PRs</div><div class=\"value num\">2</div><div class=\"sub\">100% linked to a ticket</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Releases</div><div class=\"value num\">1</div><div class=\"sub\">In the reporting period</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Delivery milestones</div><div class=\"value num\">0</div><div class=\"sub\">Customer-visible checkpoints</div></div>\n    </div>\n    <table class=\"avoid-break\" aria-label=\"Delivered work items\"><thead><tr><th>Work item</th><th>Type</th><th>Evidence</th><th>Status</th><th>Completed</th></tr></thead><tbody><tr><td><div class=\"row-title\">Refunds fail for split tender</div><div class=\"row-sub mono\">EXAMPLE-REPORTS-42</div></td><td><span class=\"chip \"><span class=\"dot\"></span>Bug fix</span></td><td class=\"num\">1 PR</td><td><span class=\"chip green\"><span class=\"dot\"></span>Shipped</span></td><td>2026-03-01</td></tr><tr><td><div class=\"row-title\">Card vault migration</div><div class=\"row-sub mono\">EXAMPLE-REPORTS-1</div></td><td><span class=\"chip blue\"><span class=\"dot\"></span>Feature</span></td><td class=\"num\">1 PR</td><td><span class=\"chip green\"><span class=\"dot\"></span>Shipped</span></td><td>2026-02-10</td></tr></tbody></table>\n    <div class=\"callout mt-24 avoid-break\"><strong>Delivery proof, not developer surveillance.</strong> Scopeworth links every report claim back to delivery evidence — tickets, pull requests, releases, and merges — so a client can verify what shipped without asking for a code review.</div></section>\n<section class=\"report-page\" aria-labelledby=\"cost-title\"><span class=\"page-label\">03 · What it cost</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">03 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Delivery investment</div><h2 id=\"cost-title\">What it cost</h2></div><div class=\"meta\">Estimated · directional figures</div></div>\n    <div class=\"grid grid-2 mb-24\">\n      <div class=\"kpi accent-blue avoid-break\"><div class=\"label\">Total estimated delivery investment</div><div class=\"value num\">—</div><div class=\"sub\" style=\"margin-top:8px\">Period delivery spend is not available. Contract value is not period spend.</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Cost composition</div><div class=\"stack mt-8\" role=\"img\" aria-label=\"Cost composition stacked bar\"><div style=\"width:0%;background:#F59E0B\" title=\"Scope expansion\"></div><div style=\"width:0%;background:#14B8A6\" title=\"Meetings &amp; coordination\"></div><div style=\"width:0%;background:#A78BFA\" title=\"Rework\"></div></div><div class=\"stack-legend\"><div class=\"item\"><span class=\"sw\" style=\"background:#F59E0B\"></span>Scope expansion · —</div><div class=\"item\"><span class=\"sw\" style=\"background:#14B8A6\"></span>Meetings &amp; coordination · —</div><div class=\"item\"><span class=\"sw\" style=\"background:#A78BFA\"></span>Rework · —</div></div><p class=\"muted mt-12\" style=\"font-size:12px\">Feature build, review and other delivery support are attributed once Invoice Defense's cost model is connected.</p></div>\n    </div>\n    <div class=\"card avoid-break mb-24\" style=\"padding:22px\"><h4 class=\"mb-16\">Estimated cost by category</h4><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Scope expansion</span><span class=\"v num\">$6,600 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#F59E0B\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Meetings &amp; coordination</span><span class=\"v num\">$150 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#14B8A6\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Rework</span><span class=\"v num\">$0 · —</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#A78BFA\"></div></div></div></div></div>\n    <p class=\"muted mt-16\" style=\"font-size:12px\">These figures are directional and depend on available data, role-based cost assumptions, and project mapping quality. See report confidence.</p></section>\n<section class=\"report-page\" aria-labelledby=\"scope-title\"><span class=\"page-label\">04 · Scope expansion</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">04 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\" style=\"color:var(--amber)\">Margin risk</div><h2 id=\"scope-title\">Where scope changed</h2></div><div class=\"meta\">Scope expansion impact · estimated</div></div>\n    <div class=\"kpi accent-amber avoid-break mb-24\" style=\"padding:22px\"><div style=\"display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap\"><div><div class=\"label\">Estimated scope expansion impact</div><div class=\"value num\" style=\"font-size:42px\">$6,600</div><div class=\"sub\" style=\"margin-top:8px;max-width:420px\">Work added after the original scope was agreed, plus reopened and re-sized baseline work.</div></div><div style=\"display:flex;gap:8px;flex-wrap:wrap\"><span class=\"chip amber\"><span class=\"dot\"></span>Margin risk: Unknown</span><span class=\"chip\"><span class=\"dot\"></span>Convert to change request</span></div></div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Added after scope lock</div><div class=\"value num\">2<span class=\"unit\" style=\"font-size:14px;font-weight:600;color:var(--muted)\"> items</span></div><div class=\"sub\">Tickets created after the cycle started</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Reopened tickets</div><div class=\"value num\">0</div><div class=\"sub\">Reopened baseline work</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Estimates grown after lock</div><div class=\"value num\">0</div><div class=\"sub\">Baseline items re-sized</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Attributed coordination</div><div class=\"value num\">1h</div><div class=\"sub\">Attributed meetings</div></div>\n    </div>\n    <h4 class=\"mb-12\">Scope expansion signals</h4>\n    <table class=\"avoid-break\" aria-label=\"Scope expansion signals\"><thead><tr><th>Signal</th><th class=\"num\">Count</th><th class=\"num\">Estimated impact</th><th>Suggested action</th></tr></thead><tbody>\n      <tr><td><div class=\"row-title\">Tickets added after scope lock</div><div class=\"row-sub\">Created after the baseline</div></td><td class=\"num\">2</td><td class=\"num\">$6,600</td><td>Convert into change request</td></tr>\n      <tr><td><div class=\"row-title\">Reopened baseline tickets</div><div class=\"row-sub\">Reason for reopening not classified</div></td><td class=\"num\">0</td><td class=\"num\">$0</td><td>Clarify acceptance criteria</td></tr>\n      <tr><td><div class=\"row-title\">Estimates grown after lock</div><div class=\"row-sub\">Baseline items re-sized mid-cycle</div></td><td class=\"num\">0</td><td class=\"num\">$0</td><td>Add review owner earlier</td></tr>\n      <tr><td><div class=\"row-title\">Attributed coordination meetings</div><div class=\"row-sub\">Meeting purpose not classified</div></td><td class=\"num\">1h</td><td class=\"num\">$150</td><td>Separate discovery from delivery budget</td></tr>\n    </tbody></table>\n    <div class=\"callout amber mt-24 avoid-break\"><div style=\"font-style:italic;color:var(--muted);margin-bottom:6px\">“Why is this month’s invoice higher than expected?”</div><strong>What the delivery evidence for Q1 2026 shows.</strong> The team delivered 2 work items, 2 PRs and 1 release for example-reports Retail during Q1 2026, while also absorbing 2 additional work items worth an estimated $6,600 after the scope baseline.</div></section>\n<section class=\"report-page\" aria-labelledby=\"rework-title\"><span class=\"page-label\">05 · Rework &amp; quality</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">05 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Quality &amp; rework</div><h2 id=\"rework-title\">Where rework happened</h2></div><div class=\"meta\">Project-level signals · not individual scoring</div></div>\n    <div class=\"grid grid-4 mb-24\">\n      <div class=\"card avoid-break\"><div class=\"label\">Rework cost</div><div class=\"value num\">$0</div><div class=\"sub\">— of delivery investment</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Reopened tickets</div><div class=\"value num\">0</div><div class=\"sub\">Of 2 completed</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Estimates grown</div><div class=\"value num\">0</div><div class=\"sub\">Baseline items re-sized</div></div>\n      <div class=\"card avoid-break\"><div class=\"label\">Unestimated movement</div><div class=\"value num\">0</div><div class=\"sub\">Counted, not valued</div></div>\n    </div>\n    <div class=\"callout avoid-break\"><strong>Interpretation.</strong> Rework here is reopened and re-sized baseline work, not individual performance. This suggests an opportunity to improve scope clarity and acceptance criteria before implementation starts — not to add pressure on individual engineers.</div>\n    <div class=\"callout green mt-12 avoid-break\"><strong>Recommended action.</strong> Add a scope confirmation checkpoint before implementation starts on high-complexity items. Capture acceptance criteria in the ticket and confirm with the client before the work enters the build queue.</div></section>\n<section class=\"report-page\" aria-labelledby=\"ai-title\"><span class=\"page-label\">06 · AI delivery economics</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">06 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\" style=\"color:var(--teal)\">AI-assisted delivery</div><h2 id=\"ai-title\">Modeled AI cycle-time comparison</h2></div><div class=\"meta\">Observed forge timestamps · self-reported AI tags</div></div>\n      <div class=\"callout avoid-break\"><strong>Not yet measured.</strong> AI-assisted delivery economics need at least one merged pull request tagged as AI-assisted and one non-assisted baseline merge in this project. Add an <em>ai-assisted</em> label or commit trailer to relevant work to unlock this section.</div></section>\n<section class=\"report-page\" aria-labelledby=\"conf-title\"><span class=\"page-label\">07 · Report confidence</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">07 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">Trust &amp; data health</div><h2 id=\"conf-title\">How trustworthy this report is</h2></div><div class=\"meta\">Report confidence · Medium</div></div>\n    <div class=\"card avoid-break mb-24\" style=\"padding:22px\"><div class=\"conf-head\"><div class=\"conf-ring\" role=\"img\" aria-label=\"Confidence score\" style=\"background:conic-gradient(var(--amber) 0 80%, var(--subtle) 80% 100%);\"><div class=\"v\">80%<small>Score</small></div></div><div><h3>Medium confidence</h3><p class=\"muted\" style=\"margin:4px 0 0;font-size:13px;max-width:520px\">Weaker coverage on confirmed reporting assumptions and release / deployment evidence. Review the recommendations on this page to improve evidence coverage.</p></div></div>\n    <div class=\"grid grid-2 mt-16\"><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">PRs linked to tickets</span><span class=\"v num\">Linked merged changes</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Tickets mapped to client / project</span><span class=\"v num\">Workspace mapping coverage</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Meetings tagged to client / project</span><span class=\"v num\">No active calendar source</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div></div><div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Rate card precision</span><span class=\"v num\">No labour hours in this period</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">AI-assisted work tagging</span><span class=\"v num\">Not tagged</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Release / deployment evidence</span><span class=\"v num\">Completed work with linked release evidence</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:50%;background:#F59E0B\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Synced evidence share</span><span class=\"v num\">Synced evidence coverage</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:100%;background:#10B981\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Source freshness</span><span class=\"v num\">No active sources</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#94A3B8\"></div></div></div><div class=\"bar-row\"><div class=\"bar-meta\"><span class=\"name\">Confirmed reporting assumptions</span><span class=\"v num\">0 of 6 reporting assumptions are confirmed or rectified for this period.</span></div><div class=\"bar-track\"><div class=\"bar-fill\" style=\"width:0%;background:#EF4444\"></div></div></div></div></div></div>\n    <div class=\"callout avoid-break mb-16\"><strong>Why this matters.</strong> Scopeworth does not pretend messy delivery data is perfect. Report confidence shows where the evidence is strong, where assumptions were used, and what should be improved before relying on the report for commercial decisions.</div>\n    <h4 class=\"mb-12\">Recommended data improvements</h4>\n    <div class=\"grid grid-2 mb-16\"><div class=\"card tight avoid-break\"><strong>1.</strong> Add client / project labels to all relevant tracker issues</div><div class=\"card tight avoid-break\"><strong>2.</strong> Include ticket IDs in PR titles or branch names</div><div class=\"card tight avoid-break\"><strong>3.</strong> Tag client / project names in calendar events</div><div class=\"card tight avoid-break\"><strong>4.</strong> Explicitly mark AI-assisted work where possible</div></div>\n    <div class=\"callout green avoid-break\"><strong>Scopeworth focuses on client, project, and team-level delivery proof.</strong> It is not designed to rank individual engineers or create performance-review leaderboards. Delivery proof, not developer surveillance.</div></section>\n<section class=\"report-page\" aria-labelledby=\"next-title\"><span class=\"page-label\">08 · Recommended actions</span><header class=\"page-header\"><div class=\"brand\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 56\" fill=\"none\" role=\"img\" aria-label=\"Scopeworth\"><g transform=\"translate(4, 8)\"><path d=\"M10 2 L2 2 L2 38 L10 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M30 2 L38 2 L38 38 L30 38\" stroke=\"#0F172A\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><path d=\"M9 28 L16 28 L16 22 L24 22 L24 14 L31 14\" stroke=\"#2563EB\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\"></path><circle cx=\"31\" cy=\"14\" r=\"2.2\" fill=\"#14B8A6\"></circle></g><text x=\"54\" y=\"36\" font-family=\"'Space Grotesk', system-ui, sans-serif\" font-size=\"26\" font-weight=\"600\" letter-spacing=\"-0.02em\" fill=\"#0F172A\">Scopeworth</text></svg></div><div class=\"crumb\"><span>example-reports Retail</span><span class=\"dot\"></span><span>example-reports Checkout Replatform</span><span class=\"dot\"></span><span class=\"num\">Q1 2026</span></div><div class=\"page-num num\">08 / 08</div></header><div class=\"section-title\"><div><div class=\"eyebrow mb-8\">From insight to action</div><h2 id=\"next-title\">What to do next</h2></div><div class=\"meta\">Five commercial actions</div></div><div class=\"rec-grid mb-16\"><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">01</span><span class=\"chip amber\"><span class=\"dot\"></span>Margin</span></div><h4>Convert scope expansion into a change request</h4><div class=\"rc-row\"><b>Why</b>$6,600 of estimated delivery investment came from work added after scope lock.</div><div class=\"rc-row\"><b>Action</b>Review added items with the client and formalize the next-cycle scope.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">02</span><span class=\"chip blue\"><span class=\"dot\"></span>Process</span></div><h4>Separate discovery from implementation budget</h4><div class=\"rc-row\"><b>Why</b>1 meetings (1 h) were attributed to this project.</div><div class=\"rc-row\"><b>Action</b>Create a dedicated discovery / clarification budget bucket.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">03</span><span class=\"chip\"><span class=\"dot\"></span>Data</span></div><h4>Improve ticket-to-PR traceability</h4><div class=\"rc-row\"><b>Why</b>0% of PRs were not linked to tickets.</div><div class=\"rc-row\"><b>Action</b>Require ticket IDs in branch names and PR titles.</div></article><article class=\"rec-card avoid-break\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">04</span><span class=\"chip\"><span class=\"dot\" style=\"background:#A78BFA\"></span>AI</span></div><h4>Track AI-assisted work explicitly</h4><div class=\"rc-row\"><b>Why</b>AI-assisted delivery cannot be measured until assisted work is tagged.</div><div class=\"rc-row\"><b>Action</b>Add an AI-assisted field or label to relevant work items.</div></article><article class=\"rec-card avoid-break\" style=\"grid-column:1 / -1\"><div style=\"display:flex;justify-content:space-between;align-items:center\"><span class=\"rc-num\">05</span><span class=\"chip green\"><span class=\"dot\"></span>Client</span></div><h4>Use this report in the next client review</h4><div class=\"rc-row\"><b>Why</b>The report provides a shared view of shipped work, cost, scope movement, and risks — useful for QBRs, retainer reviews, and invoice discussions.</div><div class=\"rc-row\"><b>Action</b>Use the executive summary and scope expansion sections in the next QBR or invoice discussion.</div></article></div></section>\n</main>\n\n</body>\n</html>"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "document": {
                      "additionalProperties": false,
                      "properties": {
                        "agencyName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "branded": {
                          "type": "boolean"
                        },
                        "composition": {
                          "additionalProperties": false,
                          "properties": {
                            "context": {
                              "additionalProperties": false,
                              "properties": {
                                "clientId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "clientName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "period": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "periodEnd": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "periodStart": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "projectId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "type": "string"
                                },
                                "projectName": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "qid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "timeRange": {
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "clientId",
                                "clientName",
                                "projectId",
                                "projectName",
                                "periodStart",
                                "periodEnd",
                                "period",
                                "timeRange",
                                "qid"
                              ],
                              "type": "object"
                            },
                            "invoiceNarratives": {
                              "additionalProperties": {
                                "maxLength": 20000,
                                "type": "string"
                              },
                              "propertyNames": {
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "ai": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "forensics": {
                                  "additionalProperties": {
                                    "type": "boolean"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "invoice": {
                                  "additionalProperties": {
                                    "additionalProperties": {
                                      "type": "boolean"
                                    },
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "layout": {
                              "additionalProperties": false,
                              "properties": {
                                "order": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "sections": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": {
                                        "type": "boolean"
                                      },
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "order",
                                "sections"
                              ],
                              "type": "object"
                            },
                            "narrative": {
                              "maxLength": 20000,
                              "type": "string"
                            },
                            "narrativeProvenance": {
                              "additionalProperties": false,
                              "properties": {
                                "modelId": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "outcome": {
                                  "enum": [
                                    "template",
                                    "generated"
                                  ],
                                  "type": "string"
                                },
                                "promptVersion": {
                                  "anyOf": [
                                    {
                                      "maxLength": 120,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "provider": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "openai",
                                        "anthropic"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "outcome",
                                "provider",
                                "modelId",
                                "promptVersion"
                              ],
                              "type": "object"
                            },
                            "tone": {
                              "enum": [
                                "default",
                                "executive",
                                "friendly",
                                "custom"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "context",
                            "layout",
                            "items",
                            "narrative",
                            "tone"
                          ],
                          "type": "object"
                        },
                        "facts": {
                          "additionalProperties": false,
                          "properties": {
                            "actions": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "action": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "n": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991,
                                    "type": "integer"
                                  },
                                  "tag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "tone": {
                                    "enum": [
                                      "amber",
                                      "blue",
                                      "neutral",
                                      "purple",
                                      "green"
                                    ],
                                    "type": "string"
                                  },
                                  "why": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "n",
                                  "tag",
                                  "tone",
                                  "title",
                                  "why",
                                  "action"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "ai": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "assistedPct": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "implementationHoursSaved": {
                                      "type": "number"
                                    },
                                    "netHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadHours": {
                                      "type": "number"
                                    },
                                    "reviewOverheadPct": {
                                      "type": [
                                        "number",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "assistedPct",
                                    "implementationHoursSaved",
                                    "reviewOverheadHours",
                                    "netHours",
                                    "reviewOverheadPct"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "aiInsufficientSample": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "assistedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "baselineChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "mergedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "taggedChanges": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "assistedChanges",
                                    "baselineChanges",
                                    "mergedChanges",
                                    "taggedChanges"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "assumptions": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "effectiveFrom": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  },
                                  "effectiveTo": {
                                    "anyOf": [
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "enum": [
                                      "cost-basis",
                                      "scope-baseline",
                                      "meeting-attribution",
                                      "ai-attribution",
                                      "reporting-period",
                                      "work-cost-allocation"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "default",
                                      "option",
                                      "manual",
                                      "date_range"
                                    ],
                                    "type": "string"
                                  },
                                  "status": {
                                    "enum": [
                                      "needs_verification",
                                      "confirmed",
                                      "rectified"
                                    ],
                                    "type": "string"
                                  },
                                  "title": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "unitOrMethod": {
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "value": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "versionId": {
                                    "anyOf": [
                                      {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "title",
                                  "value",
                                  "unitOrMethod",
                                  "source",
                                  "status",
                                  "effectiveFrom",
                                  "effectiveTo",
                                  "versionId"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "confidence": {
                              "additionalProperties": false,
                              "properties": {
                                "hints": {
                                  "default": [],
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "label": {
                                  "default": "Not measured",
                                  "enum": [
                                    "High",
                                    "Medium",
                                    "Low",
                                    "Not measured"
                                  ],
                                  "type": "string"
                                },
                                "score": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "signals": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "evidence": {
                                        "additionalProperties": false,
                                        "default": {
                                          "denominator": null,
                                          "numerator": null,
                                          "query": "Evidence path was not recorded in this historical snapshot."
                                        },
                                        "properties": {
                                          "denominator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "numerator": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "default": null
                                          },
                                          "query": {
                                            "default": "Evidence path was not recorded in this historical snapshot.",
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "numerator",
                                          "denominator",
                                          "query"
                                        ],
                                        "type": "object"
                                      },
                                      "id": {
                                        "enum": [
                                          "prs_linked",
                                          "items_mapped",
                                          "meetings_tagged",
                                          "rate_card",
                                          "ai_tagging",
                                          "release_evidence",
                                          "manual_entry_share",
                                          "freshness",
                                          "assumptions"
                                        ],
                                        "type": "string"
                                      },
                                      "label": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "note": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "pct": {
                                        "anyOf": [
                                          {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "weight": {
                                        "default": 1,
                                        "exclusiveMinimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "pct",
                                      "weight",
                                      "contribution",
                                      "evidence",
                                      "note"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "score",
                                "label",
                                "signals",
                                "hints"
                              ],
                              "type": "object"
                            },
                            "coordination": {
                              "additionalProperties": false,
                              "properties": {
                                "blendedHourlyRateCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "declined": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "hours": {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "meetings": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "taggingPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "meetings",
                                "hours",
                                "declined",
                                "costCents",
                                "blendedHourlyRateCents",
                                "taggingPct"
                              ],
                              "type": "object"
                            },
                            "currency": {
                              "anyOf": [
                                {
                                  "pattern": "^[A-Z]{3}$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "delivery": {
                              "additionalProperties": false,
                              "properties": {
                                "completedItems": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "mergedChanges": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "milestones": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesCompleted": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "objectivesTotal": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "prsLinkedPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "releaseRows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "items": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "name": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "releasedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "releaseId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "releaseId",
                                      "name",
                                      "releasedAt",
                                      "items"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "releases": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "rows": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "completedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "externalKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "linkedChanges": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "title": {
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "type": {
                                        "enum": [
                                          "epic",
                                          "story",
                                          "task",
                                          "bug",
                                          "subtask",
                                          "other"
                                        ],
                                        "type": "string"
                                      },
                                      "url": {
                                        "anyOf": [
                                          {
                                            "format": "uri",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "workItemId": {
                                        "format": "uuid",
                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "workItemId",
                                      "title",
                                      "externalKey",
                                      "type",
                                      "linkedChanges",
                                      "completedAt",
                                      "url"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "completedItems",
                                "mergedChanges",
                                "releases",
                                "milestones",
                                "objectivesTotal",
                                "objectivesCompleted",
                                "prsLinkedPct",
                                "rows",
                                "releaseRows"
                              ],
                              "type": "object"
                            },
                            "evidencePackages": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "caseId": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "contentHash": {
                                    "type": "string"
                                  },
                                  "createdAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                    "type": "string"
                                  },
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "enum": [
                                      "memo",
                                      "cr",
                                      "qbr"
                                    ],
                                    "type": "string"
                                  },
                                  "snapshot": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "case": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "agencyName": {
                                            "type": "string"
                                          },
                                          "clientName": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "confidence": {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "id": {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                            "type": "string"
                                          },
                                          "periodEnd": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "periodLabel": {
                                            "type": "string"
                                          },
                                          "periodStart": {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          "projectName": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "enum": [
                                              "Open",
                                              "Investigating",
                                              "Evidence gathered",
                                              "Disposition",
                                              "Resolved",
                                              "Filed"
                                            ],
                                            "type": "string"
                                          },
                                          "subtitle": {
                                            "type": "string"
                                          },
                                          "title": {
                                            "type": "string"
                                          },
                                          "typology": {
                                            "anyOf": [
                                              {
                                                "enum": [
                                                  "expansion",
                                                  "acdrift",
                                                  "rework",
                                                  "untraced",
                                                  "cost"
                                                ],
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "title",
                                          "subtitle",
                                          "status",
                                          "typology",
                                          "periodStart",
                                          "periodEnd",
                                          "periodLabel",
                                          "clientName",
                                          "projectName",
                                          "agencyName",
                                          "confidence"
                                        ],
                                        "type": "object"
                                      },
                                      "claims": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "id": {
                                              "minLength": 1,
                                              "type": "string"
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "text": {
                                              "minLength": 1,
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "text",
                                            "nodeIds",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "custody": {
                                        "additionalProperties": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "id": {
                                                "minLength": 1,
                                                "type": "string"
                                              },
                                              "kind": {
                                                "enum": [
                                                  "jira",
                                                  "pr",
                                                  "release",
                                                  "meeting",
                                                  "note"
                                                ],
                                                "type": "string"
                                              },
                                              "meta": {
                                                "type": "string"
                                              },
                                              "t": {
                                                "minLength": 1,
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "id",
                                              "t",
                                              "meta"
                                            ],
                                            "type": "object"
                                          },
                                          "type": "array"
                                        },
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "draft": {
                                        "type": "boolean"
                                      },
                                      "engine": {
                                        "enum": [
                                          "template",
                                          "claude"
                                        ],
                                        "type": "string"
                                      },
                                      "flags": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "detail": {
                                              "type": "string"
                                            },
                                            "disposition": {
                                              "anyOf": [
                                                {
                                                  "enum": [
                                                    "inscope",
                                                    "cr",
                                                    "billable",
                                                    "writeoff",
                                                    "decision"
                                                  ],
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "dispositionLabel": {
                                              "type": "string"
                                            },
                                            "evidenceMissing": {
                                              "type": "boolean"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "impact": {
                                              "type": "string"
                                            },
                                            "impactCents": {
                                              "anyOf": [
                                                {
                                                  "maximum": 9007199254740991,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "nodeIds": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "rationale": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "resolvedAt": {
                                              "anyOf": [
                                                {
                                                  "format": "date-time",
                                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "severity": {
                                              "enum": [
                                                "amber",
                                                "red"
                                              ],
                                              "type": "string"
                                            },
                                            "signalKey": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "type": "string"
                                            },
                                            "typology": {
                                              "enum": [
                                                "added-after-lock",
                                                "reopened-from",
                                                "estimate-growth",
                                                "meeting-overrun",
                                                "untraced"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "signalKey",
                                            "typology",
                                            "severity",
                                            "title",
                                            "detail",
                                            "impact",
                                            "impactCents",
                                            "nodeIds",
                                            "disposition",
                                            "dispositionLabel",
                                            "rationale",
                                            "resolvedAt",
                                            "evidenceMissing",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "generatedAt": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                        "type": "string"
                                      },
                                      "kind": {
                                        "enum": [
                                          "memo",
                                          "cr",
                                          "qbr"
                                        ],
                                        "type": "string"
                                      },
                                      "notes": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "at": {
                                              "format": "date-time",
                                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                              "type": "string"
                                            },
                                            "auditEventIds": {
                                              "items": {
                                                "format": "uuid",
                                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "authorName": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "body": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "format": "uuid",
                                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                              "type": "string"
                                            },
                                            "targetNodeId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "authorName",
                                            "at",
                                            "targetNodeId",
                                            "body",
                                            "auditEventIds"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "prose": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "sections": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "body": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                },
                                                "heading": {
                                                  "minLength": 1,
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "heading",
                                                "body"
                                              ],
                                              "type": "object"
                                            },
                                            "type": "array"
                                          },
                                          "summary": {
                                            "minLength": 1,
                                            "type": "string"
                                          },
                                          "title": {
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "title",
                                          "summary",
                                          "sections"
                                        ],
                                        "type": "object"
                                      },
                                      "provenance": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "graphBuild": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "graphHash": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "id": {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                    "type": "string"
                                                  },
                                                  "profile": {
                                                    "type": "string"
                                                  },
                                                  "rulesVersion": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "graphHash",
                                                  "rulesVersion",
                                                  "profile"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "lock": {
                                            "anyOf": [
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "approvalRef": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "authority": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "effectiveAt": {
                                                    "format": "date-time",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                                    "type": "string"
                                                  },
                                                  "lockedOn": {
                                                    "format": "date",
                                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                    "type": "string"
                                                  },
                                                  "lockId": {
                                                    "anyOf": [
                                                      {
                                                        "format": "uuid",
                                                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "memberCount": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 0,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  },
                                                  "provenance": {
                                                    "enum": [
                                                      "explicit",
                                                      "register_scope_lock_date",
                                                      "engagement_starts_on"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "reconstructed": {
                                                    "type": "boolean"
                                                  },
                                                  "resolverVersion": {
                                                    "type": "string"
                                                  },
                                                  "timeZone": {
                                                    "type": "string"
                                                  },
                                                  "version": {
                                                    "anyOf": [
                                                      {
                                                        "maximum": 9007199254740991,
                                                        "minimum": 1,
                                                        "type": "integer"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "lockId",
                                                  "version",
                                                  "lockedOn",
                                                  "effectiveAt",
                                                  "timeZone",
                                                  "provenance",
                                                  "reconstructed",
                                                  "authority",
                                                  "approvalRef",
                                                  "memberCount",
                                                  "resolverVersion"
                                                ],
                                                "type": "object"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "lock",
                                          "graphBuild"
                                        ],
                                        "type": "object"
                                      },
                                      "version": {
                                        "const": 1,
                                        "type": "number"
                                      },
                                      "watermark": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "version",
                                      "kind",
                                      "draft",
                                      "watermark",
                                      "case",
                                      "flags",
                                      "notes",
                                      "custody",
                                      "claims",
                                      "prose",
                                      "engine",
                                      "generatedAt"
                                    ],
                                    "type": "object"
                                  },
                                  "status": {
                                    "enum": [
                                      "draft",
                                      "final"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "caseId",
                                  "kind",
                                  "status",
                                  "contentHash",
                                  "createdAt",
                                  "snapshot"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "investment": {
                              "additionalProperties": false,
                              "properties": {
                                "cloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "coordinationCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "coordinationPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "costEvidence": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "cloudLines": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "linkedTimeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "timeEntries": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        }
                                      },
                                      "required": [
                                        "timeEntries",
                                        "linkedTimeEntries",
                                        "cloudLines"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "currencyConflict": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimated": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "estimatedCloudCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "invoicedCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCategories": {
                                  "anyOf": [
                                    {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "category": {
                                            "enum": [
                                              "feature",
                                              "bug",
                                              "other_linked",
                                              "unlinked"
                                            ],
                                            "type": "string"
                                          },
                                          "cents": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "hours": {
                                            "minimum": 0,
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "category",
                                          "cents",
                                          "hours"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "labourHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "reworkCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reworkPct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "roleBandHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "scopeCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "scopePct": {
                                  "anyOf": [
                                    {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "totalCents": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unpricedHours": {
                                  "anyOf": [
                                    {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "totalCents",
                                "labourCents",
                                "labourHours",
                                "unpricedHours",
                                "roleBandHours",
                                "cloudCents",
                                "estimatedCloudCents",
                                "estimated",
                                "invoicedCents",
                                "coordinationCents",
                                "coordinationPct",
                                "scopeCents",
                                "scopePct",
                                "reworkCents",
                                "reworkPct",
                                "labourCategories",
                                "currencyConflict",
                                "costEvidence"
                              ],
                              "type": "object"
                            },
                            "manualEntrySharePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            },
                            "periodEnd": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "periodStart": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "scope": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "addedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "addedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "blendedHourlyRateCents": {
                                      "anyOf": [
                                        {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "grownCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "grownItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "priced": {
                                      "type": "boolean"
                                    },
                                    "reopenedCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "reopenedItems": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "scopeLockOn": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "totalCents": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "unestimated": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "scopeLockOn",
                                    "totalCents",
                                    "priced",
                                    "addedItems",
                                    "addedCents",
                                    "reopenedItems",
                                    "reopenedCents",
                                    "grownItems",
                                    "grownCents",
                                    "unestimated",
                                    "blendedHourlyRateCents"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sources": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "label": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "projectRows": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "reason": {
                                    "enum": [
                                      "no_activity",
                                      "unattributed",
                                      "empty"
                                    ],
                                    "type": "string"
                                  },
                                  "source": {
                                    "enum": [
                                      "commercial",
                                      "tracker",
                                      "code",
                                      "release",
                                      "calendar"
                                    ],
                                    "type": "string"
                                  },
                                  "state": {
                                    "enum": [
                                      "data_present",
                                      "not_connected",
                                      "no_data"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "source",
                                  "state",
                                  "label"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "periodStart",
                            "periodEnd",
                            "currency",
                            "delivery",
                            "investment",
                            "scope",
                            "coordination",
                            "ai",
                            "aiInsufficientSample",
                            "confidence",
                            "sources",
                            "manualEntrySharePct",
                            "assumptions",
                            "actions",
                            "evidencePackages"
                          ],
                          "type": "object"
                        },
                        "generatedAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "teamType": {
                          "anyOf": [
                            {
                              "enum": [
                                "agency",
                                "inhouse",
                                "external"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "const": 1,
                          "type": "number"
                        }
                      },
                      "required": [
                        "version",
                        "agencyName",
                        "composition",
                        "facts",
                        "branded",
                        "generatedAt"
                      ],
                      "type": "object"
                    },
                    "html": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "html",
                    "document"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Preview a report composition",
        "tags": [
          "reports"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "reports.create",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Composition client/project must belong to each other inside the tenant; optional saved-report id must retain that same selection.",
            "Ordered reporting dates and current plan windows apply to new facts/previews/narratives/snapshots, while stored reads reproduce original evidence.",
            "Monthly shipment quota and AI token allowance are separate from technical traffic limits.",
            "All responses are synchronous. Retry uncertain writes with the original key and identical body; external uncertainty never authorizes a second provider dispatch.",
            "Sharing, report deletion and email/Slack/Teams distribution remain unavailable."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "reports:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/search": {
      "get": {
        "description": "Build a safe corpus for a customer's own search interface. Returns grouped metadata, evidence facts and destination actions; the app ranks text locally and the server does not collect the search term. Optional client/project filters bound directory and report rows as well as facts; workspace connection rows are omitted for a project/client-filtered corpus. Start/end are paired; UTC is the default zone. Groups are bounded by the domain service; no server search or cursor pagination is promised. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nstart and end are paired and ordered; tz is optional and defaults to UTC.\n\nA supplied project must belong to a supplied client; all returned customer datasets follow the selection.",
        "operationId": "search.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tz",
            "required": false,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "canManageSources": true,
                      "facts": {
                        "aiAssistedChanges": null,
                        "aiNetHours": null,
                        "changeRequestReference": null,
                        "scopeSignals": null,
                        "scopeValue": null
                      },
                      "groups": [
                        {
                          "items": [
                            {
                              "action": {
                                "type": "goto",
                                "view": "sources"
                              },
                              "icon": "meeting",
                              "id": "insight-coverage:commercial",
                              "keywords": "Report coverage is limited by contracts — not connected 0 of 5 sources reporting",
                              "kind": "insight",
                              "meta": "0 of 5 sources reporting",
                              "section": "insights",
                              "title": "Report coverage is limited by contracts — not connected",
                              "tone": "warn"
                            },
                            {
                              "action": {
                                "type": "goto",
                                "view": "sources"
                              },
                              "icon": "meeting",
                              "id": "insight-coverage:tracker",
                              "keywords": "Report coverage is limited by tracker — not connected 0 of 5 sources reporting",
                              "kind": "insight",
                              "meta": "0 of 5 sources reporting",
                              "section": "insights",
                              "title": "Report coverage is limited by tracker — not connected",
                              "tone": "warn"
                            },
                            {
                              "action": {
                                "type": "goto",
                                "view": "sources"
                              },
                              "icon": "meeting",
                              "id": "insight-coverage:code",
                              "keywords": "Report coverage is limited by code — not connected 0 of 5 sources reporting",
                              "kind": "insight",
                              "meta": "0 of 5 sources reporting",
                              "section": "insights",
                              "title": "Report coverage is limited by code — not connected",
                              "tone": "warn"
                            },
                            {
                              "action": {
                                "type": "goto",
                                "view": "sources"
                              },
                              "icon": "meeting",
                              "id": "insight-coverage:release",
                              "keywords": "Report coverage is limited by releases — not connected 0 of 5 sources reporting",
                              "kind": "insight",
                              "meta": "0 of 5 sources reporting",
                              "section": "insights",
                              "title": "Report coverage is limited by releases — not connected",
                              "tone": "warn"
                            },
                            {
                              "action": {
                                "type": "goto",
                                "view": "sources"
                              },
                              "icon": "meeting",
                              "id": "insight-coverage:calendar",
                              "keywords": "Report coverage is limited by calendar — not connected 0 of 5 sources reporting",
                              "kind": "insight",
                              "meta": "0 of 5 sources reporting",
                              "section": "insights",
                              "title": "Report coverage is limited by calendar — not connected",
                              "tone": "warn"
                            }
                          ],
                          "section": "insights"
                        },
                        {
                          "items": [
                            {
                              "action": {
                                "clientId": "00000000-0000-4000-8000-000000000005",
                                "type": "client"
                              },
                              "glyph": {
                                "glyph": "HB",
                                "tone": "amber"
                              },
                              "id": "client-00000000-0000-4000-8000-000000000005",
                              "keywords": "Hidden by selection 1 active project client",
                              "kind": "client",
                              "meta": "1 active project",
                              "section": "clients",
                              "title": "Hidden by selection"
                            },
                            {
                              "action": {
                                "clientId": "33333333-3333-4333-8333-333333333333",
                                "type": "client"
                              },
                              "glyph": {
                                "glyph": "SV",
                                "tone": "teal"
                              },
                              "id": "client-33333333-3333-4333-8333-333333333333",
                              "keywords": "Synthetic visible client 1 active project client",
                              "kind": "client",
                              "meta": "1 active project",
                              "section": "clients",
                              "title": "Synthetic visible client"
                            }
                          ],
                          "section": "clients"
                        },
                        {
                          "items": [
                            {
                              "action": {
                                "projectId": "00000000-0000-4000-8000-000000000006",
                                "type": "project"
                              },
                              "icon": "doc",
                              "id": "project-00000000-0000-4000-8000-000000000006",
                              "keywords": "Hidden by selection Hidden by selection Active project",
                              "kind": "project",
                              "meta": "Hidden by selection · Active",
                              "section": "projects",
                              "title": "Hidden by selection"
                            },
                            {
                              "action": {
                                "projectId": "11111111-1111-4111-8111-111111111111",
                                "type": "project"
                              },
                              "icon": "doc",
                              "id": "project-11111111-1111-4111-8111-111111111111",
                              "keywords": "Synthetic visible project Synthetic visible client Active project",
                              "kind": "project",
                              "meta": "Synthetic visible client · Active",
                              "section": "projects",
                              "title": "Synthetic visible project"
                            }
                          ],
                          "section": "projects"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canManageSources": {
                      "type": "boolean"
                    },
                    "facts": {
                      "additionalProperties": false,
                      "properties": {
                        "aiAssistedChanges": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "aiNetHours": {
                          "anyOf": [
                            {
                              "maxLength": 20,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changeRequestReference": {
                          "anyOf": [
                            {
                              "maxLength": 40,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopeSignals": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopeValue": {
                          "anyOf": [
                            {
                              "maxLength": 40,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "changeRequestReference",
                        "scopeSignals",
                        "scopeValue",
                        "aiAssistedChanges",
                        "aiNetHours"
                      ],
                      "type": "object"
                    },
                    "groups": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "items": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "action": {
                                  "oneOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "type": {
                                          "const": "goto",
                                          "type": "string"
                                        },
                                        "view": {
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "view"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "drawer": {
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "goto-drawer",
                                          "type": "string"
                                        },
                                        "view": {
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "view",
                                        "drawer"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "reportId": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "report",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "reportId"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "clientId": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "client",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "clientId"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "projectId": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "project",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "projectId"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                "badge": {
                                  "maxLength": 20,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "badgeTone": {
                                  "enum": [
                                    "amber",
                                    "purple"
                                  ],
                                  "type": "string"
                                },
                                "glyph": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "glyph": {
                                      "maxLength": 3,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "tone": {
                                      "enum": [
                                        "blue",
                                        "teal",
                                        "amber",
                                        "purple",
                                        "red"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "glyph",
                                    "tone"
                                  ],
                                  "type": "object"
                                },
                                "icon": {
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "id": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "keywords": {
                                  "maxLength": 2000,
                                  "type": "string"
                                },
                                "kind": {
                                  "enum": [
                                    "page",
                                    "metric",
                                    "insight",
                                    "event",
                                    "cost",
                                    "question",
                                    "client",
                                    "project",
                                    "report",
                                    "integration",
                                    "action"
                                  ],
                                  "type": "string"
                                },
                                "meta": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "section": {
                                  "enum": [
                                    "pages",
                                    "metrics",
                                    "insights",
                                    "timeline",
                                    "costs",
                                    "questions",
                                    "clients",
                                    "projects",
                                    "reports",
                                    "integrations",
                                    "actions"
                                  ],
                                  "type": "string"
                                },
                                "title": {
                                  "maxLength": 400,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "tone": {
                                  "enum": [
                                    "ok",
                                    "warn",
                                    "risk",
                                    "ai"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "section",
                                "title",
                                "action"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "section": {
                            "enum": [
                              "pages",
                              "metrics",
                              "insights",
                              "timeline",
                              "costs",
                              "questions",
                              "clients",
                              "projects",
                              "reports",
                              "integrations",
                              "actions"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "section",
                          "items"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "canManageSources",
                    "facts",
                    "groups"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read the searchable evidence corpus",
        "tags": [
          "intelligence"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "command_center.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "start and end are paired and ordered; tz is optional and defaults to UTC.",
            "A supplied project must belong to a supplied client; all returned customer datasets follow the selection."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "command-center:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/settings/api-keys": {
      "get": {
        "description": "Inspect workspace API-key prefixes, lifecycle status, expiry and exact scope strings for inventory and rotation monitoring. Requires workspace.manage and the API-key metadata read scope. The response never contains a complete secret or stored hash and cannot create, rotate or revoke a key. Browser management remains separately session-authorized. Returns the configured key list without pagination. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "apiKeys.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "canManage": false,
                      "keys": [
                        {
                          "createdAt": "2026-10-01T06:54:37.910Z",
                          "createdBy": "Synthetic API owner",
                          "environment": "test",
                          "expiresAt": null,
                          "graceUntil": null,
                          "id": "00000000-0000-4000-8000-000000000008",
                          "lastUsedAt": "2026-10-01T06:54:38.817Z",
                          "name": "Synthetic read contract key",
                          "prefix": "sw_test_EXAMPLE…",
                          "profileId": null,
                          "revokedAt": null,
                          "rotatedFrom": null,
                          "scopes": [
                            "command-center:read",
                            "forensics:read",
                            "scope-creep:read",
                            "invoice-defense:read",
                            "ai-economics:read",
                            "report-confidence:read",
                            "cost-model:read",
                            "data-sources:read",
                            "audit-trail:read",
                            "clients:read",
                            "usage-billing:read",
                            "api-keys:read"
                          ],
                          "status": "active"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canManage": {
                      "type": "boolean"
                    },
                    "keys": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "createdBy": {
                            "anyOf": [
                              {
                                "maxLength": 200,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "environment": {
                            "enum": [
                              "live",
                              "test"
                            ],
                            "type": "string"
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "graceUntil": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "lastUsedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "prefix": {
                            "maxLength": 40,
                            "minLength": 1,
                            "type": "string"
                          },
                          "profileId": {
                            "anyOf": [
                              {
                                "maxLength": 60,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revokedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rotatedFrom": {
                            "anyOf": [
                              {
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scopes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "rotated",
                              "revoked",
                              "expired"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "environment",
                          "prefix",
                          "scopes",
                          "profileId",
                          "status",
                          "createdAt",
                          "createdBy",
                          "lastUsedAt",
                          "expiresAt",
                          "graceUntil",
                          "revokedAt",
                          "rotatedFrom"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "scopeOptions": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "available": {
                            "type": "boolean"
                          },
                          "capability": {
                            "type": "string"
                          },
                          "effect": {
                            "enum": [
                              "read",
                              "write",
                              "delete"
                            ],
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "legacy": {
                            "type": "boolean"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "capability",
                          "label",
                          "effect",
                          "legacy",
                          "available",
                          "reason"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "keys",
                    "canManage"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read API-key metadata",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "workspace.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "api-keys:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/settings/organization": {
      "get": {
        "description": "Inspect redacted workspace settings, commercial defaults, pinned residency and enforced lifecycle/data-window policy. Requires the existing workspace.manage permission in addition to the cost-model read scope. Unsupported controls include their availability reason. No secret forwarding headers or provider keys are returned. The response is a settings snapshot with no pagination; this endpoint changes no settings. Preserve null, unavailable and partial evidence, source provenance, confidence qualifiers and currency units; absent evidence is not zero. Dates are civil dates in the supplied IANA zone. No individual performance ranking is returned. Requires a current workspace member, this operation's exact key scope and current creator permission. Invalid filters return 400; missing or foreign resources return 404; missing permission or an effective plan restriction returns 403. Revoked or expired keys return 401; throttled requests return 429 with Retry-After.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
        "operationId": "commercial.read",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic workspace",
                    "value": {
                      "canDeleteImmediately": false,
                      "canEdit": true,
                      "dataPolicy": {
                        "aiProviders": [],
                        "auditRetentionDays": 365,
                        "backupRetentionMaxDays": 14,
                        "dataWindowDays": 365,
                        "deletionGraceDays": 30,
                        "exportLinkHours": 24,
                        "plan": "growth"
                      },
                      "deletion": null,
                      "footprint": {
                        "clients": 2,
                        "connections": 0,
                        "members": 1,
                        "projects": 2,
                        "reports": 0
                      },
                      "identity": {
                        "createdAt": "2026-10-01T06:54:37.887Z",
                        "createdBy": null,
                        "lastEditedAt": null,
                        "name": "Read contract fixture",
                        "region": "us",
                        "residency": "United States",
                        "slug": "read-contract-fixture",
                        "workspaceId": "22222222-2222-4222-8222-222222222222"
                      },
                      "role": "owner",
                      "settings": {
                        "commercial": {
                          "billingModel": "Time & Materials",
                          "costModel": "Role-based hourly rate",
                          "includeAiTooling": true,
                          "includeCloudCost": true,
                          "includeMeetings": true,
                          "includePlanning": true,
                          "marginTarget": 35,
                          "overhead": 18,
                          "rates": {
                            "data": 110,
                            "design": 90,
                            "engineering": 85,
                            "engineeringManagement": 120,
                            "product": 95,
                            "qa": 65
                          },
                          "rounding": "Nearest $1"
                        },
                        "defaults": {
                          "currency": "USD",
                          "fiscalYearStart": "January",
                          "focusTarget": 60,
                          "hoursPerDay": 8,
                          "language": "English",
                          "region": "Europe",
                          "timeZone": "UTC",
                          "utilizationTarget": 75,
                          "weeksPerQuarter": 13,
                          "workingDays": [
                            "Mon",
                            "Tue",
                            "Wed",
                            "Thu",
                            "Fri"
                          ]
                        },
                        "identity": {
                          "website": ""
                        },
                        "narrativeAi": {
                          "modelOverride": null
                        },
                        "privacy": {
                          "allowCrossRegionAi": false,
                          "allowDataExport": true,
                          "anonymizeContributors": true,
                          "hideMarginFromNonAdmins": true,
                          "hideSalaryFromManagers": true,
                          "keepReportsInRegion": true,
                          "requireApprovalForSources": true,
                          "retention": {
                            "aggregated": "3 years",
                            "audit": "1 year",
                            "exports": "90 days",
                            "raw": "90 days"
                          }
                        },
                        "security": {
                          "auditForwardingEnabled": false,
                          "auditForwardingHeaders": [],
                          "auditForwardingUrl": "",
                          "requireSso": false,
                          "requireTwoFactor": false
                        }
                      },
                      "unavailable": {
                        "auditForwarding": {
                          "available": false,
                          "reason": "ScopeWorth has no outbound audit forwarder yet. The audit trail is recorded and readable under Audit, and can be exported from there."
                        },
                        "dataResidency": {
                          "available": false,
                          "reason": "The data region is pinned when the workspace is created and cannot be moved; a different region means a different workspace."
                        },
                        "logo": {
                          "available": false,
                          "reason": "ScopeWorth does not store organization logos yet; reports and exports use the workspace name."
                        },
                        "reportRegion": {
                          "available": false,
                          "reason": "Reports, snapshots and PDFs are generated and stored in this workspace's pinned region. A report that is emailed, shared or downloaded is also held by the email provider and its recipients, so no setting can keep every copy in the region."
                        },
                        "retention": {
                          "available": false,
                          "reason": "Retention follows the plan and ScopeWorth's workspace lifecycle, not a per-workspace choice. The data window changes with the plan; audit-log retention is set under Audit."
                        },
                        "ssoEnforcement": {
                          "available": false,
                          "reason": "No identity provider is configured for this workspace, and enforcement is refused until at least one admin can sign in through one."
                        },
                        "twoFactorEnforcement": {
                          "available": false,
                          "reason": "Two-factor authentication is not enabled on this ScopeWorth cell yet, so it cannot be required of members from here."
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canDeleteImmediately": {
                      "type": "boolean"
                    },
                    "canEdit": {
                      "type": "boolean"
                    },
                    "dataPolicy": {
                      "additionalProperties": false,
                      "properties": {
                        "aiProviders": {
                          "items": {
                            "enum": [
                              "openai",
                              "anthropic"
                            ],
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "auditRetentionDays": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "backupRetentionMaxDays": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "dataWindowDays": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "const": "unlimited",
                              "type": "string"
                            }
                          ]
                        },
                        "deletionGraceDays": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "exportLinkHours": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "plan": {
                          "enum": [
                            "free",
                            "entry",
                            "starter",
                            "growth",
                            "scale"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "plan",
                        "dataWindowDays",
                        "auditRetentionDays",
                        "exportLinkHours",
                        "deletionGraceDays",
                        "backupRetentionMaxDays",
                        "aiProviders"
                      ],
                      "type": "object"
                    },
                    "deletion": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "daysRemaining": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "mode": {
                              "enum": [
                                "grace",
                                "immediate"
                              ],
                              "type": "string"
                            },
                            "purgeAfter": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "requestedAt": {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            "requestedBy": {
                              "anyOf": [
                                {
                                  "maxLength": 200,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "status": {
                              "enum": [
                                "scheduled",
                                "pending",
                                "deleted"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "requestedAt",
                            "purgeAfter",
                            "daysRemaining",
                            "requestedBy"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "footprint": {
                      "additionalProperties": false,
                      "properties": {
                        "clients": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "connections": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "members": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "projects": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "reports": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "members",
                        "clients",
                        "projects",
                        "connections",
                        "reports"
                      ],
                      "type": "object"
                    },
                    "identity": {
                      "additionalProperties": false,
                      "properties": {
                        "createdAt": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                          "type": "string"
                        },
                        "createdBy": {
                          "anyOf": [
                            {
                              "maxLength": 200,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lastEditedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "region": {
                          "enum": [
                            "us",
                            "eu"
                          ],
                          "type": "string"
                        },
                        "residency": {
                          "enum": [
                            "Europe",
                            "United States",
                            "Europe (Frankfurt)",
                            "Europe (Amsterdam)",
                            "United Kingdom (London)",
                            "United States (Virginia)",
                            "Asia Pacific (Singapore)"
                          ],
                          "type": "string"
                        },
                        "slug": {
                          "maxLength": 64,
                          "minLength": 1,
                          "type": "string"
                        },
                        "workspaceId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "workspaceId",
                        "name",
                        "slug",
                        "createdAt",
                        "createdBy",
                        "lastEditedAt",
                        "region",
                        "residency"
                      ],
                      "type": "object"
                    },
                    "role": {
                      "enum": [
                        "owner",
                        "admin",
                        "member"
                      ],
                      "type": "string"
                    },
                    "settings": {
                      "additionalProperties": false,
                      "properties": {
                        "commercial": {
                          "additionalProperties": false,
                          "properties": {
                            "billingModel": {
                              "default": "Time & Materials",
                              "enum": [
                                "Time & Materials",
                                "Fixed-bid",
                                "Subscription",
                                "Hybrid (T&M + cap)"
                              ],
                              "type": "string"
                            },
                            "costModel": {
                              "default": "Role-based hourly rate",
                              "enum": [
                                "Role-based hourly rate",
                                "Loaded salary cost",
                                "Blended hourly rate",
                                "Per-person actuals"
                              ],
                              "type": "string"
                            },
                            "includeAiTooling": {
                              "default": true,
                              "type": "boolean"
                            },
                            "includeCloudCost": {
                              "default": true,
                              "type": "boolean"
                            },
                            "includeMeetings": {
                              "default": true,
                              "type": "boolean"
                            },
                            "includePlanning": {
                              "default": true,
                              "type": "boolean"
                            },
                            "marginTarget": {
                              "default": 35,
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "overhead": {
                              "default": 18,
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "rates": {
                              "additionalProperties": false,
                              "properties": {
                                "data": {
                                  "default": 110,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "design": {
                                  "default": 90,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "engineering": {
                                  "default": 85,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "engineeringManagement": {
                                  "default": 120,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "product": {
                                  "default": 95,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "qa": {
                                  "default": 65,
                                  "maximum": 100000,
                                  "minimum": 0,
                                  "type": "number"
                                }
                              },
                              "required": [
                                "engineering",
                                "product",
                                "qa",
                                "engineeringManagement",
                                "design",
                                "data"
                              ],
                              "type": "object"
                            },
                            "rounding": {
                              "default": "Nearest $1",
                              "enum": [
                                "Nearest $1",
                                "Nearest $10",
                                "Nearest $100"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "billingModel",
                            "marginTarget",
                            "overhead",
                            "rounding",
                            "includeMeetings",
                            "includePlanning",
                            "includeCloudCost",
                            "includeAiTooling",
                            "costModel",
                            "rates"
                          ],
                          "type": "object"
                        },
                        "defaults": {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "default": "USD",
                              "enum": [
                                "USD",
                                "EUR",
                                "GBP",
                                "CHF",
                                "SGD"
                              ],
                              "type": "string"
                            },
                            "fiscalYearStart": {
                              "default": "January",
                              "enum": [
                                "January",
                                "April",
                                "July",
                                "October"
                              ],
                              "type": "string"
                            },
                            "focusTarget": {
                              "default": 60,
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "hoursPerDay": {
                              "default": 8,
                              "maximum": 24,
                              "minimum": 0.5,
                              "type": "number"
                            },
                            "language": {
                              "default": "English",
                              "enum": [
                                "English",
                                "Nederlands",
                                "Deutsch",
                                "Français",
                                "Português"
                              ],
                              "type": "string"
                            },
                            "region": {
                              "default": "Europe",
                              "enum": [
                                "Europe",
                                "North America",
                                "United Kingdom",
                                "Asia Pacific",
                                "Latin America"
                              ],
                              "type": "string"
                            },
                            "timeZone": {
                              "default": "UTC",
                              "maxLength": 64,
                              "minLength": 1,
                              "type": "string"
                            },
                            "utilizationTarget": {
                              "default": 75,
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "weeksPerQuarter": {
                              "default": 13,
                              "maximum": 26,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "workingDays": {
                              "default": [
                                "Mon",
                                "Tue",
                                "Wed",
                                "Thu",
                                "Fri"
                              ],
                              "items": {
                                "enum": [
                                  "Mon",
                                  "Tue",
                                  "Wed",
                                  "Thu",
                                  "Fri",
                                  "Sat",
                                  "Sun"
                                ],
                                "type": "string"
                              },
                              "maxItems": 7,
                              "type": "array"
                            }
                          },
                          "required": [
                            "region",
                            "timeZone",
                            "currency",
                            "language",
                            "fiscalYearStart",
                            "workingDays",
                            "hoursPerDay",
                            "utilizationTarget",
                            "focusTarget",
                            "weeksPerQuarter"
                          ],
                          "type": "object"
                        },
                        "identity": {
                          "additionalProperties": false,
                          "properties": {
                            "website": {
                              "default": "",
                              "maxLength": 400,
                              "type": "string"
                            }
                          },
                          "required": [
                            "website"
                          ],
                          "type": "object"
                        },
                        "narrativeAi": {
                          "additionalProperties": false,
                          "properties": {
                            "modelOverride": {
                              "anyOf": [
                                {
                                  "maxLength": 120,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "default": null
                            }
                          },
                          "required": [
                            "modelOverride"
                          ],
                          "type": "object"
                        },
                        "privacy": {
                          "additionalProperties": false,
                          "properties": {
                            "allowCrossRegionAi": {
                              "default": false,
                              "type": "boolean"
                            },
                            "allowDataExport": {
                              "default": true,
                              "type": "boolean"
                            },
                            "anonymizeContributors": {
                              "default": true,
                              "type": "boolean"
                            },
                            "hideMarginFromNonAdmins": {
                              "default": true,
                              "type": "boolean"
                            },
                            "hideSalaryFromManagers": {
                              "default": true,
                              "type": "boolean"
                            },
                            "keepReportsInRegion": {
                              "default": true,
                              "type": "boolean"
                            },
                            "requireApprovalForSources": {
                              "default": true,
                              "type": "boolean"
                            },
                            "retention": {
                              "additionalProperties": false,
                              "properties": {
                                "aggregated": {
                                  "default": "3 years",
                                  "enum": [
                                    "1 year",
                                    "2 years",
                                    "3 years",
                                    "5 years",
                                    "7 years"
                                  ],
                                  "type": "string"
                                },
                                "audit": {
                                  "default": "1 year",
                                  "enum": [
                                    "90 days",
                                    "6 months",
                                    "1 year",
                                    "2 years",
                                    "7 years"
                                  ],
                                  "type": "string"
                                },
                                "exports": {
                                  "default": "90 days",
                                  "enum": [
                                    "30 days",
                                    "90 days",
                                    "1 year",
                                    "Indefinite"
                                  ],
                                  "type": "string"
                                },
                                "raw": {
                                  "default": "90 days",
                                  "enum": [
                                    "30 days",
                                    "60 days",
                                    "90 days",
                                    "180 days",
                                    "1 year"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "raw",
                                "aggregated",
                                "audit",
                                "exports"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "keepReportsInRegion",
                            "allowCrossRegionAi",
                            "anonymizeContributors",
                            "hideSalaryFromManagers",
                            "hideMarginFromNonAdmins",
                            "allowDataExport",
                            "requireApprovalForSources",
                            "retention"
                          ],
                          "type": "object"
                        },
                        "security": {
                          "additionalProperties": false,
                          "properties": {
                            "auditForwardingEnabled": {
                              "default": false,
                              "type": "boolean"
                            },
                            "auditForwardingHeaders": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "name": {
                                    "default": "",
                                    "maxLength": 120,
                                    "type": "string"
                                  },
                                  "value": {
                                    "default": "",
                                    "maxLength": 2000,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name",
                                  "value"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "type": "array"
                            },
                            "auditForwardingUrl": {
                              "default": "",
                              "maxLength": 400,
                              "type": "string"
                            },
                            "requireSso": {
                              "default": false,
                              "type": "boolean"
                            },
                            "requireTwoFactor": {
                              "default": false,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "requireTwoFactor",
                            "requireSso",
                            "auditForwardingEnabled",
                            "auditForwardingUrl",
                            "auditForwardingHeaders"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "identity",
                        "security",
                        "defaults",
                        "commercial",
                        "privacy",
                        "narrativeAi"
                      ],
                      "type": "object"
                    },
                    "unavailable": {
                      "additionalProperties": false,
                      "properties": {
                        "auditForwarding": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "dataResidency": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "logo": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "reportRegion": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "retention": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "ssoEnforcement": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        },
                        "twoFactorEnforcement": {
                          "additionalProperties": false,
                          "properties": {
                            "available": {
                              "const": false,
                              "type": "boolean"
                            },
                            "reason": {
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "available",
                            "reason"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "logo",
                        "twoFactorEnforcement",
                        "ssoEnforcement",
                        "auditForwarding",
                        "dataResidency",
                        "reportRegion",
                        "retention"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "identity",
                    "settings",
                    "role",
                    "canEdit",
                    "footprint",
                    "deletion",
                    "dataPolicy",
                    "unavailable"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read workspace commercial settings",
        "tags": [
          "administration"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "workspace.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "cost-model:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/simulator/scenarios": {
      "get": {
        "description": "Read all saved scenarios for one authorized client, newest update first. Complete inputs, frozen catalog/currency/model and calculated results are included; no pagination or detail GET exists. Explicit key scope, current creator actions, tenant/project access and RLS apply on every request and replay.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCosts are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.\n\nInputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.\n\nUpdates retain the frozen currency and catalog and require the observed positive version.\n\nWrite never implies Delete; legacy keys retain only their original reviewed reads.",
        "operationId": "scenarios.list",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "22222222-2222-4222-8222-222222222222",
            "in": "query",
            "name": "clientId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL capacity workflow",
                    "value": {
                      "canWrite": true,
                      "scenarios": [
                        {
                          "clientId": "22222222-2222-4222-8222-222222222222",
                          "createdAt": "2026-10-01T08:15:25.125Z",
                          "currency": "USD",
                          "id": "33333333-3333-4333-8333-333333333333",
                          "inputs": {
                            "baseline": {
                              "baseWeeks": 12,
                              "designerPct": 20,
                              "engCost": 24000,
                              "engineers": 1,
                              "existingLoad": 0,
                              "leadPct": 20,
                              "otherCost": 9500,
                              "pmPct": 30,
                              "qa": 0,
                              "qaCost": 7500,
                              "teamAvailability": 100
                            },
                            "feature": {
                              "complexity": "medium",
                              "deadline": null,
                              "dependency": "medium",
                              "name": "Untitled feature",
                              "notes": "",
                              "objective": "",
                              "parallelizable": 55,
                              "productUncertainty": "medium",
                              "techUncertainty": "medium",
                              "value": ""
                            },
                            "scenarios": [
                              {
                                "add": [],
                                "badge": null,
                                "id": "s-base",
                                "name": "Baseline team",
                                "sub": "No extra capacity",
                                "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                              },
                              {
                                "add": [
                                  {
                                    "n": 1,
                                    "resource": "int"
                                  }
                                ],
                                "badge": "rec",
                                "id": "s-a",
                                "name": "Scenario A",
                                "sub": "Add 1 senior engineer",
                                "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                              },
                              {
                                "add": [
                                  {
                                    "n": 3,
                                    "resource": "con"
                                  }
                                ],
                                "badge": "warn",
                                "id": "s-b",
                                "name": "Scenario B",
                                "sub": "Add 3 contractors",
                                "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                              },
                              {
                                "add": [
                                  {
                                    "n": 4,
                                    "resource": "agc"
                                  }
                                ],
                                "badge": "bad",
                                "id": "s-c",
                                "name": "Scenario C",
                                "sub": "External agency pod",
                                "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                              }
                            ],
                            "selectedScenarioId": "s-a",
                            "sliders": {
                              "complexity": 60,
                              "coordination": 55,
                              "integrationBottleneck": 50,
                              "onboarding": 50,
                              "parallelizable": 55,
                              "qaBottleneck": 35,
                              "reviewBottleneck": 40,
                              "teamSize": 4
                            }
                          },
                          "modelVersion": "dashboard-simulator-v1",
                          "name": "Reviewed capacity forecast",
                          "projectId": "11111111-1111-4111-8111-111111111111",
                          "resourceCatalog": [
                            {
                              "icon": "int",
                              "id": "int",
                              "monthly": 24000,
                              "name": "Internal engineer",
                              "onboardLoad": 0.3,
                              "overhead": 0.6,
                              "prod": 100,
                              "ramp": 1,
                              "sub": "Existing team, immediate alignment"
                            },
                            {
                              "icon": "con",
                              "id": "con",
                              "monthly": 13000,
                              "name": "Contractor",
                              "onboardLoad": 0.6,
                              "overhead": 0.8,
                              "prod": 90,
                              "ramp": 2,
                              "sub": "Independent, project-scoped"
                            },
                            {
                              "icon": "agc",
                              "id": "agc",
                              "monthly": 13000,
                              "name": "External agency dev",
                              "onboardLoad": 0.9,
                              "overhead": 1,
                              "prod": 85,
                              "ramp": 3,
                              "sub": "Vendor pod or staff aug"
                            },
                            {
                              "icon": "qa",
                              "id": "qa",
                              "monthly": 7500,
                              "name": "QA / test engineer",
                              "onboardLoad": 0.3,
                              "overhead": 0.5,
                              "prod": 100,
                              "ramp": 1,
                              "sub": "Releases bottleneck on test cycles"
                            },
                            {
                              "icon": "pm",
                              "id": "pm",
                              "monthly": 9500,
                              "name": "Product manager",
                              "onboardLoad": 0.2,
                              "overhead": 0.4,
                              "prod": 100,
                              "ramp": 1,
                              "sub": "Reduces clarification overhead"
                            },
                            {
                              "icon": "pm",
                              "id": "des",
                              "monthly": 9500,
                              "name": "Designer",
                              "onboardLoad": 0.3,
                              "overhead": 0.4,
                              "prod": 100,
                              "ramp": 1,
                              "sub": "Front-loads UX surface work"
                            },
                            {
                              "icon": "int",
                              "id": "lead",
                              "monthly": 14000,
                              "name": "Tech lead / architect",
                              "onboardLoad": 0.2,
                              "overhead": 0.3,
                              "prod": 110,
                              "ramp": 0,
                              "sub": "Improves review throughput"
                            },
                            {
                              "icon": "qa",
                              "id": "ops",
                              "monthly": 12000,
                              "name": "DevOps / platform",
                              "onboardLoad": 0.3,
                              "overhead": 0.4,
                              "prod": 100,
                              "ramp": 1,
                              "sub": "Unblocks integration bottlenecks"
                            }
                          ],
                          "result": {
                            "addedCost": 32536.383051354376,
                            "baseCost": 45090.93349181073,
                            "confLabel": "Medium",
                            "confScore": 70,
                            "effectiveN": 3.1702001188825046,
                            "effectiveRatio": 0.7925500297206262,
                            "grossN": 4,
                            "monthlyBurn": 54650,
                            "rampWeeksLost": 0.56,
                            "speedup": 1.9704091262659347,
                            "totalCost": 77627.3165431651,
                            "usedAlpha": 0.8724999999999999,
                            "usedParallel": 0.55,
                            "weeks": 6.370105775515186
                          },
                          "status": "discovery",
                          "updatedAt": "2026-10-01T08:15:25.137Z",
                          "version": 2
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canWrite": {
                      "type": "boolean"
                    },
                    "scenarios": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "clientId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "pattern": "^[A-Z]{3}$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "inputs": {
                            "additionalProperties": false,
                            "properties": {
                              "baseline": {
                                "additionalProperties": false,
                                "properties": {
                                  "baseWeeks": {
                                    "exclusiveMinimum": 0,
                                    "maximum": 1000,
                                    "type": "number"
                                  },
                                  "designerPct": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "engCost": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "engineers": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "existingLoad": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "leadPct": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "otherCost": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "pmPct": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "qa": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "qaCost": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "teamAvailability": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "engineers",
                                  "qa",
                                  "pmPct",
                                  "designerPct",
                                  "leadPct",
                                  "engCost",
                                  "qaCost",
                                  "otherCost",
                                  "teamAvailability",
                                  "existingLoad",
                                  "baseWeeks"
                                ],
                                "type": "object"
                              },
                              "feature": {
                                "additionalProperties": false,
                                "properties": {
                                  "complexity": {
                                    "enum": [
                                      "low",
                                      "medium",
                                      "high",
                                      "very-high"
                                    ],
                                    "type": "string"
                                  },
                                  "deadline": {
                                    "anyOf": [
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "dependency": {
                                    "enum": [
                                      "low",
                                      "medium",
                                      "high"
                                    ],
                                    "type": "string"
                                  },
                                  "name": {
                                    "maxLength": 200,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "notes": {
                                    "maxLength": 4000,
                                    "type": "string"
                                  },
                                  "objective": {
                                    "maxLength": 2000,
                                    "type": "string"
                                  },
                                  "parallelizable": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "productUncertainty": {
                                    "enum": [
                                      "low",
                                      "medium",
                                      "high"
                                    ],
                                    "type": "string"
                                  },
                                  "techUncertainty": {
                                    "enum": [
                                      "low",
                                      "medium",
                                      "high"
                                    ],
                                    "type": "string"
                                  },
                                  "value": {
                                    "maxLength": 2000,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name",
                                  "objective",
                                  "value",
                                  "complexity",
                                  "dependency",
                                  "techUncertainty",
                                  "productUncertainty",
                                  "deadline",
                                  "notes",
                                  "parallelizable"
                                ],
                                "type": "object"
                              },
                              "scenarios": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "add": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "n": {
                                            "maximum": 100,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "resource": {
                                            "maxLength": 40,
                                            "minLength": 1,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "resource",
                                          "n"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    },
                                    "badge": {
                                      "anyOf": [
                                        {
                                          "enum": [
                                            "rec",
                                            "warn",
                                            "bad"
                                          ],
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "id": {
                                      "maxLength": 80,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "name": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "sub": {
                                      "maxLength": 300,
                                      "type": "string"
                                    },
                                    "tradeoffs": {
                                      "maxLength": 2000,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "sub",
                                    "add",
                                    "badge",
                                    "tradeoffs"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "minItems": 1,
                                "type": "array"
                              },
                              "selectedScenarioId": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "sliders": {
                                "additionalProperties": false,
                                "properties": {
                                  "complexity": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "coordination": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "integrationBottleneck": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "onboarding": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "parallelizable": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "qaBottleneck": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "reviewBottleneck": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "teamSize": {
                                    "maximum": 100,
                                    "minimum": 1,
                                    "type": "integer"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "required": [
                              "feature",
                              "baseline",
                              "scenarios",
                              "sliders",
                              "selectedScenarioId"
                            ],
                            "type": "object"
                          },
                          "modelVersion": {
                            "const": "dashboard-simulator-v1",
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "projectId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "type": "string"
                          },
                          "resourceCatalog": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "icon": {
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "id": {
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "monthly": {
                                  "maximum": 10000000,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "name": {
                                  "maxLength": 120,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "onboardLoad": {
                                  "maximum": 10,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "overhead": {
                                  "maximum": 10,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "prod": {
                                  "maximum": 200,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "ramp": {
                                  "maximum": 52,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                "sub": {
                                  "maxLength": 300,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "sub",
                                "icon",
                                "ramp",
                                "monthly",
                                "prod",
                                "overhead",
                                "onboardLoad"
                              ],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "minItems": 1,
                            "type": "array"
                          },
                          "result": {
                            "additionalProperties": false,
                            "properties": {
                              "addedCost": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "baseCost": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "confLabel": {
                                "enum": [
                                  "High",
                                  "Medium",
                                  "Low"
                                ],
                                "type": "string"
                              },
                              "confScore": {
                                "maximum": 95,
                                "minimum": 30,
                                "type": "integer"
                              },
                              "effectiveN": {
                                "exclusiveMinimum": 0,
                                "type": "number"
                              },
                              "effectiveRatio": {
                                "maximum": 1,
                                "minimum": 0,
                                "type": "number"
                              },
                              "grossN": {
                                "exclusiveMinimum": 0,
                                "type": "number"
                              },
                              "monthlyBurn": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "rampWeeksLost": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "speedup": {
                                "exclusiveMinimum": 0,
                                "type": "number"
                              },
                              "totalCost": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "usedAlpha": {
                                "exclusiveMinimum": 0,
                                "type": "number"
                              },
                              "usedParallel": {
                                "maximum": 1,
                                "minimum": 0,
                                "type": "number"
                              },
                              "weeks": {
                                "exclusiveMinimum": 0,
                                "type": "number"
                              }
                            },
                            "required": [
                              "weeks",
                              "totalCost",
                              "baseCost",
                              "addedCost",
                              "monthlyBurn",
                              "grossN",
                              "effectiveN",
                              "effectiveRatio",
                              "speedup",
                              "confScore",
                              "confLabel",
                              "rampWeeksLost",
                              "usedParallel",
                              "usedAlpha"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "enum": [
                              "live",
                              "discovery",
                              "closed"
                            ],
                            "type": "string"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                            "type": "string"
                          },
                          "version": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "clientId",
                          "projectId",
                          "name",
                          "status",
                          "inputs",
                          "currency",
                          "resourceCatalog",
                          "result",
                          "modelVersion",
                          "version",
                          "createdAt",
                          "updatedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "scenarios",
                    "canWrite"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read saved capacity scenarios",
        "tags": [
          "scenarios"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "simulator.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Costs are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.",
            "Inputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.",
            "Updates retain the frozen currency and catalog and require the observed positive version.",
            "Write never implies Delete; legacy keys retain only their original reviewed reads."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scenarios:read",
          "stability": "stable"
        }
      },
      "post": {
        "description": "Save supported seed-derived inputs and calculate with the existing dashboard-simulator-v1 model. Resource monthly costs can be edited on the first save, but resource identities and productivity/ramp/overhead coefficients remain frozen. A retry saves one scenario. Explicit key scope, current creator actions, tenant/project access and RLS apply on every request and replay.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCosts are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.\n\nInputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.\n\nUpdates retain the frozen currency and catalog and require the observed positive version.\n\nWrite never implies Delete; legacy keys retain only their original reviewed reads.",
        "operationId": "scenarios.create",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-scenarios.create",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "clientId": "22222222-2222-4222-8222-222222222222",
                    "currency": "USD",
                    "inputs": {
                      "baseline": {
                        "baseWeeks": 12,
                        "designerPct": 20,
                        "engCost": 24000,
                        "engineers": 1,
                        "existingLoad": 0,
                        "leadPct": 20,
                        "otherCost": 9500,
                        "pmPct": 30,
                        "qa": 0,
                        "qaCost": 7500,
                        "teamAvailability": 100
                      },
                      "feature": {
                        "complexity": "medium",
                        "deadline": null,
                        "dependency": "medium",
                        "name": "Untitled feature",
                        "notes": "",
                        "objective": "",
                        "parallelizable": 55,
                        "productUncertainty": "medium",
                        "techUncertainty": "medium",
                        "value": ""
                      },
                      "scenarios": [
                        {
                          "add": [],
                          "badge": null,
                          "id": "s-base",
                          "name": "Baseline team",
                          "sub": "No extra capacity",
                          "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                        },
                        {
                          "add": [
                            {
                              "n": 1,
                              "resource": "int"
                            }
                          ],
                          "badge": "rec",
                          "id": "s-a",
                          "name": "Scenario A",
                          "sub": "Add 1 senior engineer",
                          "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                        },
                        {
                          "add": [
                            {
                              "n": 3,
                              "resource": "con"
                            }
                          ],
                          "badge": "warn",
                          "id": "s-b",
                          "name": "Scenario B",
                          "sub": "Add 3 contractors",
                          "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                        },
                        {
                          "add": [
                            {
                              "n": 4,
                              "resource": "agc"
                            }
                          ],
                          "badge": "bad",
                          "id": "s-c",
                          "name": "Scenario C",
                          "sub": "External agency pod",
                          "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                        }
                      ],
                      "selectedScenarioId": "s-a",
                      "sliders": {
                        "complexity": 60,
                        "coordination": 55,
                        "integrationBottleneck": 50,
                        "onboarding": 50,
                        "parallelizable": 55,
                        "qaBottleneck": 35,
                        "reviewBottleneck": 40,
                        "teamSize": 4
                      }
                    },
                    "name": "Example capacity forecast",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "resourceCatalog": [
                      {
                        "icon": "int",
                        "id": "int",
                        "monthly": 24000,
                        "name": "Internal engineer",
                        "onboardLoad": 0.3,
                        "overhead": 0.6,
                        "prod": 100,
                        "ramp": 1,
                        "sub": "Existing team, immediate alignment"
                      },
                      {
                        "icon": "con",
                        "id": "con",
                        "monthly": 13000,
                        "name": "Contractor",
                        "onboardLoad": 0.6,
                        "overhead": 0.8,
                        "prod": 90,
                        "ramp": 2,
                        "sub": "Independent, project-scoped"
                      },
                      {
                        "icon": "agc",
                        "id": "agc",
                        "monthly": 13000,
                        "name": "External agency dev",
                        "onboardLoad": 0.9,
                        "overhead": 1,
                        "prod": 85,
                        "ramp": 3,
                        "sub": "Vendor pod or staff aug"
                      },
                      {
                        "icon": "qa",
                        "id": "qa",
                        "monthly": 7500,
                        "name": "QA / test engineer",
                        "onboardLoad": 0.3,
                        "overhead": 0.5,
                        "prod": 100,
                        "ramp": 1,
                        "sub": "Releases bottleneck on test cycles"
                      },
                      {
                        "icon": "pm",
                        "id": "pm",
                        "monthly": 9500,
                        "name": "Product manager",
                        "onboardLoad": 0.2,
                        "overhead": 0.4,
                        "prod": 100,
                        "ramp": 1,
                        "sub": "Reduces clarification overhead"
                      },
                      {
                        "icon": "pm",
                        "id": "des",
                        "monthly": 9500,
                        "name": "Designer",
                        "onboardLoad": 0.3,
                        "overhead": 0.4,
                        "prod": 100,
                        "ramp": 1,
                        "sub": "Front-loads UX surface work"
                      },
                      {
                        "icon": "int",
                        "id": "lead",
                        "monthly": 14000,
                        "name": "Tech lead / architect",
                        "onboardLoad": 0.2,
                        "overhead": 0.3,
                        "prod": 110,
                        "ramp": 0,
                        "sub": "Improves review throughput"
                      },
                      {
                        "icon": "qa",
                        "id": "ops",
                        "monthly": 12000,
                        "name": "DevOps / platform",
                        "onboardLoad": 0.3,
                        "overhead": 0.4,
                        "prod": 100,
                        "ramp": 1,
                        "sub": "Unblocks integration bottlenecks"
                      }
                    ],
                    "status": "discovery"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "pattern": "^[A-Z]{3}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "inputs": {
                    "properties": {
                      "baseline": {
                        "properties": {
                          "baseWeeks": {
                            "exclusiveMinimum": 0,
                            "maximum": 1000,
                            "type": "number"
                          },
                          "designerPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "engCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "engineers": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "existingLoad": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "leadPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "otherCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "pmPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "qa": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "qaCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "teamAvailability": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engineers",
                          "qa",
                          "pmPct",
                          "designerPct",
                          "leadPct",
                          "engCost",
                          "qaCost",
                          "otherCost",
                          "teamAvailability",
                          "existingLoad",
                          "baseWeeks"
                        ],
                        "type": "object"
                      },
                      "feature": {
                        "properties": {
                          "complexity": {
                            "enum": [
                              "low",
                              "medium",
                              "high",
                              "very-high"
                            ],
                            "type": "string"
                          },
                          "deadline": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dependency": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "notes": {
                            "maxLength": 4000,
                            "type": "string"
                          },
                          "objective": {
                            "maxLength": 2000,
                            "type": "string"
                          },
                          "parallelizable": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "productUncertainty": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "techUncertainty": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "value": {
                            "maxLength": 2000,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "objective",
                          "value",
                          "complexity",
                          "dependency",
                          "techUncertainty",
                          "productUncertainty",
                          "deadline",
                          "notes",
                          "parallelizable"
                        ],
                        "type": "object"
                      },
                      "scenarios": {
                        "items": {
                          "properties": {
                            "add": {
                              "items": {
                                "properties": {
                                  "n": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "resource": {
                                    "maxLength": 40,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "resource",
                                  "n"
                                ],
                                "type": "object"
                              },
                              "maxItems": 20,
                              "type": "array"
                            },
                            "badge": {
                              "anyOf": [
                                {
                                  "enum": [
                                    "rec",
                                    "warn",
                                    "bad"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "sub": {
                              "maxLength": 300,
                              "type": "string"
                            },
                            "tradeoffs": {
                              "maxLength": 2000,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "sub",
                            "add",
                            "badge",
                            "tradeoffs"
                          ],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      "selectedScenarioId": {
                        "maxLength": 80,
                        "minLength": 1,
                        "type": "string"
                      },
                      "sliders": {
                        "properties": {
                          "complexity": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "coordination": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "integrationBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "onboarding": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "parallelizable": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "qaBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "reviewBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "teamSize": {
                            "maximum": 100,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "feature",
                      "baseline",
                      "scenarios",
                      "sliders",
                      "selectedScenarioId"
                    ],
                    "type": "object"
                  },
                  "name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "resourceCatalog": {
                    "items": {
                      "properties": {
                        "icon": {
                          "maxLength": 40,
                          "minLength": 1,
                          "type": "string"
                        },
                        "id": {
                          "maxLength": 40,
                          "minLength": 1,
                          "type": "string"
                        },
                        "monthly": {
                          "maximum": 10000000,
                          "minimum": 0,
                          "type": "number"
                        },
                        "name": {
                          "maxLength": 120,
                          "minLength": 1,
                          "type": "string"
                        },
                        "onboardLoad": {
                          "maximum": 10,
                          "minimum": 0,
                          "type": "number"
                        },
                        "overhead": {
                          "maximum": 10,
                          "minimum": 0,
                          "type": "number"
                        },
                        "prod": {
                          "maximum": 200,
                          "minimum": 0,
                          "type": "number"
                        },
                        "ramp": {
                          "maximum": 52,
                          "minimum": 0,
                          "type": "number"
                        },
                        "sub": {
                          "maxLength": 300,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "sub",
                        "icon",
                        "ramp",
                        "monthly",
                        "prod",
                        "overhead",
                        "onboardLoad"
                      ],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "minItems": 1,
                    "type": "array"
                  },
                  "status": {
                    "enum": [
                      "live",
                      "discovery",
                      "closed"
                    ],
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "clientId",
                  "projectId",
                  "name",
                  "status",
                  "inputs",
                  "currency"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL capacity workflow",
                    "value": {
                      "clientId": "22222222-2222-4222-8222-222222222222",
                      "createdAt": "2026-10-01T08:15:25.125Z",
                      "currency": "USD",
                      "id": "33333333-3333-4333-8333-333333333333",
                      "inputs": {
                        "baseline": {
                          "baseWeeks": 12,
                          "designerPct": 20,
                          "engCost": 24000,
                          "engineers": 1,
                          "existingLoad": 0,
                          "leadPct": 20,
                          "otherCost": 9500,
                          "pmPct": 30,
                          "qa": 0,
                          "qaCost": 7500,
                          "teamAvailability": 100
                        },
                        "feature": {
                          "complexity": "medium",
                          "deadline": null,
                          "dependency": "medium",
                          "name": "Untitled feature",
                          "notes": "",
                          "objective": "",
                          "parallelizable": 55,
                          "productUncertainty": "medium",
                          "techUncertainty": "medium",
                          "value": ""
                        },
                        "scenarios": [
                          {
                            "add": [],
                            "badge": null,
                            "id": "s-base",
                            "name": "Baseline team",
                            "sub": "No extra capacity",
                            "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                          },
                          {
                            "add": [
                              {
                                "n": 1,
                                "resource": "int"
                              }
                            ],
                            "badge": "rec",
                            "id": "s-a",
                            "name": "Scenario A",
                            "sub": "Add 1 senior engineer",
                            "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                          },
                          {
                            "add": [
                              {
                                "n": 3,
                                "resource": "con"
                              }
                            ],
                            "badge": "warn",
                            "id": "s-b",
                            "name": "Scenario B",
                            "sub": "Add 3 contractors",
                            "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                          },
                          {
                            "add": [
                              {
                                "n": 4,
                                "resource": "agc"
                              }
                            ],
                            "badge": "bad",
                            "id": "s-c",
                            "name": "Scenario C",
                            "sub": "External agency pod",
                            "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                          }
                        ],
                        "selectedScenarioId": "s-a",
                        "sliders": {
                          "complexity": 60,
                          "coordination": 55,
                          "integrationBottleneck": 50,
                          "onboarding": 50,
                          "parallelizable": 55,
                          "qaBottleneck": 35,
                          "reviewBottleneck": 40,
                          "teamSize": 4
                        }
                      },
                      "modelVersion": "dashboard-simulator-v1",
                      "name": "Example capacity forecast",
                      "projectId": "11111111-1111-4111-8111-111111111111",
                      "resourceCatalog": [
                        {
                          "icon": "int",
                          "id": "int",
                          "monthly": 24000,
                          "name": "Internal engineer",
                          "onboardLoad": 0.3,
                          "overhead": 0.6,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Existing team, immediate alignment"
                        },
                        {
                          "icon": "con",
                          "id": "con",
                          "monthly": 13000,
                          "name": "Contractor",
                          "onboardLoad": 0.6,
                          "overhead": 0.8,
                          "prod": 90,
                          "ramp": 2,
                          "sub": "Independent, project-scoped"
                        },
                        {
                          "icon": "agc",
                          "id": "agc",
                          "monthly": 13000,
                          "name": "External agency dev",
                          "onboardLoad": 0.9,
                          "overhead": 1,
                          "prod": 85,
                          "ramp": 3,
                          "sub": "Vendor pod or staff aug"
                        },
                        {
                          "icon": "qa",
                          "id": "qa",
                          "monthly": 7500,
                          "name": "QA / test engineer",
                          "onboardLoad": 0.3,
                          "overhead": 0.5,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Releases bottleneck on test cycles"
                        },
                        {
                          "icon": "pm",
                          "id": "pm",
                          "monthly": 9500,
                          "name": "Product manager",
                          "onboardLoad": 0.2,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Reduces clarification overhead"
                        },
                        {
                          "icon": "pm",
                          "id": "des",
                          "monthly": 9500,
                          "name": "Designer",
                          "onboardLoad": 0.3,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Front-loads UX surface work"
                        },
                        {
                          "icon": "int",
                          "id": "lead",
                          "monthly": 14000,
                          "name": "Tech lead / architect",
                          "onboardLoad": 0.2,
                          "overhead": 0.3,
                          "prod": 110,
                          "ramp": 0,
                          "sub": "Improves review throughput"
                        },
                        {
                          "icon": "qa",
                          "id": "ops",
                          "monthly": 12000,
                          "name": "DevOps / platform",
                          "onboardLoad": 0.3,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Unblocks integration bottlenecks"
                        }
                      ],
                      "result": {
                        "addedCost": 32536.383051354376,
                        "baseCost": 45090.93349181073,
                        "confLabel": "Medium",
                        "confScore": 70,
                        "effectiveN": 3.1702001188825046,
                        "effectiveRatio": 0.7925500297206262,
                        "grossN": 4,
                        "monthlyBurn": 54650,
                        "rampWeeksLost": 0.56,
                        "speedup": 1.9704091262659347,
                        "totalCost": 77627.3165431651,
                        "usedAlpha": 0.8724999999999999,
                        "usedParallel": 0.55,
                        "weeks": 6.370105775515186
                      },
                      "status": "discovery",
                      "updatedAt": "2026-10-01T08:15:25.125Z",
                      "version": 1
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clientId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                      "type": "string"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "inputs": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "baseWeeks": {
                              "exclusiveMinimum": 0,
                              "maximum": 1000,
                              "type": "number"
                            },
                            "designerPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "engCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "engineers": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "existingLoad": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "leadPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "otherCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "pmPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qa": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "qaCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamAvailability": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            }
                          },
                          "required": [
                            "engineers",
                            "qa",
                            "pmPct",
                            "designerPct",
                            "leadPct",
                            "engCost",
                            "qaCost",
                            "otherCost",
                            "teamAvailability",
                            "existingLoad",
                            "baseWeeks"
                          ],
                          "type": "object"
                        },
                        "feature": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "enum": [
                                "low",
                                "medium",
                                "high",
                                "very-high"
                              ],
                              "type": "string"
                            },
                            "deadline": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "dependency": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "notes": {
                              "maxLength": 4000,
                              "type": "string"
                            },
                            "objective": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "productUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "techUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "maxLength": 2000,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "objective",
                            "value",
                            "complexity",
                            "dependency",
                            "techUncertainty",
                            "productUncertainty",
                            "deadline",
                            "notes",
                            "parallelizable"
                          ],
                          "type": "object"
                        },
                        "scenarios": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "add": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "n": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "resource": {
                                      "maxLength": 40,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "resource",
                                    "n"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "type": "array"
                              },
                              "badge": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "rec",
                                      "warn",
                                      "bad"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "sub": {
                                "maxLength": 300,
                                "type": "string"
                              },
                              "tradeoffs": {
                                "maxLength": 2000,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "sub",
                              "add",
                              "badge",
                              "tradeoffs"
                            ],
                            "type": "object"
                          },
                          "maxItems": 20,
                          "minItems": 1,
                          "type": "array"
                        },
                        "selectedScenarioId": {
                          "maxLength": 80,
                          "minLength": 1,
                          "type": "string"
                        },
                        "sliders": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "coordination": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "integrationBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "onboarding": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qaBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "reviewBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamSize": {
                              "maximum": 100,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "feature",
                        "baseline",
                        "scenarios",
                        "sliders",
                        "selectedScenarioId"
                      ],
                      "type": "object"
                    },
                    "modelVersion": {
                      "const": "dashboard-simulator-v1",
                      "type": "string"
                    },
                    "name": {
                      "maxLength": 200,
                      "minLength": 1,
                      "type": "string"
                    },
                    "projectId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "resourceCatalog": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "icon": {
                            "maxLength": 40,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 40,
                            "minLength": 1,
                            "type": "string"
                          },
                          "monthly": {
                            "maximum": 10000000,
                            "minimum": 0,
                            "type": "number"
                          },
                          "name": {
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "onboardLoad": {
                            "maximum": 10,
                            "minimum": 0,
                            "type": "number"
                          },
                          "overhead": {
                            "maximum": 10,
                            "minimum": 0,
                            "type": "number"
                          },
                          "prod": {
                            "maximum": 200,
                            "minimum": 0,
                            "type": "number"
                          },
                          "ramp": {
                            "maximum": 52,
                            "minimum": 0,
                            "type": "number"
                          },
                          "sub": {
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "sub",
                          "icon",
                          "ramp",
                          "monthly",
                          "prod",
                          "overhead",
                          "onboardLoad"
                        ],
                        "type": "object"
                      },
                      "maxItems": 20,
                      "minItems": 1,
                      "type": "array"
                    },
                    "result": {
                      "additionalProperties": false,
                      "properties": {
                        "addedCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "baseCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "confLabel": {
                          "enum": [
                            "High",
                            "Medium",
                            "Low"
                          ],
                          "type": "string"
                        },
                        "confScore": {
                          "maximum": 95,
                          "minimum": 30,
                          "type": "integer"
                        },
                        "effectiveN": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "effectiveRatio": {
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "grossN": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "monthlyBurn": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "rampWeeksLost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "speedup": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "totalCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "usedAlpha": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "usedParallel": {
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "weeks": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        }
                      },
                      "required": [
                        "weeks",
                        "totalCost",
                        "baseCost",
                        "addedCost",
                        "monthlyBurn",
                        "grossN",
                        "effectiveN",
                        "effectiveRatio",
                        "speedup",
                        "confScore",
                        "confLabel",
                        "rampWeeksLost",
                        "usedParallel",
                        "usedAlpha"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "live",
                        "discovery",
                        "closed"
                      ],
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                      "type": "string"
                    },
                    "version": {
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "projectId",
                    "name",
                    "status",
                    "inputs",
                    "currency",
                    "resourceCatalog",
                    "result",
                    "modelVersion",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Save a capacity forecast",
        "tags": [
          "scenarios"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "simulator.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Costs are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.",
            "Inputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.",
            "Updates retain the frozen currency and catalog and require the observed positive version.",
            "Write never implies Delete; legacy keys retain only their original reviewed reads."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scenarios:write",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/simulator/scenarios/{id}": {
      "delete": {
        "description": "Destructive: remove the selected saved scenario, requiring scenarios:delete separately from write and current simulator.manage. The actual removal writes one audit event. Identical retries and later requests for a scenario already deleted in this workspace return empty 204; unknown/foreign IDs return generic 404. Source evidence is unchanged. Explicit key scope, current creator actions, tenant/project access and RLS apply on every request and replay.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCosts are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.\n\nInputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.\n\nUpdates retain the frozen currency and catalog and require the observed positive version.\n\nWrite never implies Delete; legacy keys retain only their original reviewed reads.",
        "operationId": "scenarios.delete",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-scenarios.delete",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Completed; empty response body.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete a saved capacity scenario",
        "tags": [
          "scenarios"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "simulator.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Costs are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.",
            "Inputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.",
            "Updates retain the frozen currency and catalog and require the observed positive version.",
            "Write never implies Delete; legacy keys retain only their original reviewed reads."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scenarios:delete",
          "stability": "stable"
        }
      },
      "patch": {
        "description": "Submit the complete updated inputs with the observed version. The existing model recomputes using the originally saved catalog and currency; later rate cards cannot relabel historical projections. Stale/concurrent edits conflict, and both original/destination projects require access. Explicit key scope, current creator actions, tenant/project access and RLS apply on every request and replay.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCosts are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.\n\nInputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.\n\nUpdates retain the frozen currency and catalog and require the observed positive version.\n\nWrite never implies Delete; legacy keys retain only their original reviewed reads.",
        "operationId": "scenarios.update",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "33333333-3333-4333-8333-333333333333",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "example-scenarios.update",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "clientId": "22222222-2222-4222-8222-222222222222",
                    "currency": "USD",
                    "inputs": {
                      "baseline": {
                        "baseWeeks": 12,
                        "designerPct": 20,
                        "engCost": 24000,
                        "engineers": 1,
                        "existingLoad": 0,
                        "leadPct": 20,
                        "otherCost": 9500,
                        "pmPct": 30,
                        "qa": 0,
                        "qaCost": 7500,
                        "teamAvailability": 100
                      },
                      "feature": {
                        "complexity": "medium",
                        "deadline": null,
                        "dependency": "medium",
                        "name": "Untitled feature",
                        "notes": "",
                        "objective": "",
                        "parallelizable": 55,
                        "productUncertainty": "medium",
                        "techUncertainty": "medium",
                        "value": ""
                      },
                      "scenarios": [
                        {
                          "add": [],
                          "badge": null,
                          "id": "s-base",
                          "name": "Baseline team",
                          "sub": "No extra capacity",
                          "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                        },
                        {
                          "add": [
                            {
                              "n": 1,
                              "resource": "int"
                            }
                          ],
                          "badge": "rec",
                          "id": "s-a",
                          "name": "Scenario A",
                          "sub": "Add 1 senior engineer",
                          "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                        },
                        {
                          "add": [
                            {
                              "n": 3,
                              "resource": "con"
                            }
                          ],
                          "badge": "warn",
                          "id": "s-b",
                          "name": "Scenario B",
                          "sub": "Add 3 contractors",
                          "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                        },
                        {
                          "add": [
                            {
                              "n": 4,
                              "resource": "agc"
                            }
                          ],
                          "badge": "bad",
                          "id": "s-c",
                          "name": "Scenario C",
                          "sub": "External agency pod",
                          "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                        }
                      ],
                      "selectedScenarioId": "s-a",
                      "sliders": {
                        "complexity": 60,
                        "coordination": 55,
                        "integrationBottleneck": 50,
                        "onboarding": 50,
                        "parallelizable": 55,
                        "qaBottleneck": 35,
                        "reviewBottleneck": 40,
                        "teamSize": 4
                      }
                    },
                    "name": "Reviewed capacity forecast",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "status": "discovery",
                    "version": 1
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "currency": {
                    "anyOf": [
                      {
                        "pattern": "^[A-Z]{3}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "inputs": {
                    "properties": {
                      "baseline": {
                        "properties": {
                          "baseWeeks": {
                            "exclusiveMinimum": 0,
                            "maximum": 1000,
                            "type": "number"
                          },
                          "designerPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "engCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "engineers": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "existingLoad": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "leadPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "otherCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "pmPct": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "qa": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "qaCost": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "teamAvailability": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          }
                        },
                        "required": [
                          "engineers",
                          "qa",
                          "pmPct",
                          "designerPct",
                          "leadPct",
                          "engCost",
                          "qaCost",
                          "otherCost",
                          "teamAvailability",
                          "existingLoad",
                          "baseWeeks"
                        ],
                        "type": "object"
                      },
                      "feature": {
                        "properties": {
                          "complexity": {
                            "enum": [
                              "low",
                              "medium",
                              "high",
                              "very-high"
                            ],
                            "type": "string"
                          },
                          "deadline": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dependency": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "notes": {
                            "maxLength": 4000,
                            "type": "string"
                          },
                          "objective": {
                            "maxLength": 2000,
                            "type": "string"
                          },
                          "parallelizable": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "productUncertainty": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "techUncertainty": {
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ],
                            "type": "string"
                          },
                          "value": {
                            "maxLength": 2000,
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "objective",
                          "value",
                          "complexity",
                          "dependency",
                          "techUncertainty",
                          "productUncertainty",
                          "deadline",
                          "notes",
                          "parallelizable"
                        ],
                        "type": "object"
                      },
                      "scenarios": {
                        "items": {
                          "properties": {
                            "add": {
                              "items": {
                                "properties": {
                                  "n": {
                                    "maximum": 100,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "resource": {
                                    "maxLength": 40,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "resource",
                                  "n"
                                ],
                                "type": "object"
                              },
                              "maxItems": 20,
                              "type": "array"
                            },
                            "badge": {
                              "anyOf": [
                                {
                                  "enum": [
                                    "rec",
                                    "warn",
                                    "bad"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "sub": {
                              "maxLength": 300,
                              "type": "string"
                            },
                            "tradeoffs": {
                              "maxLength": 2000,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "sub",
                            "add",
                            "badge",
                            "tradeoffs"
                          ],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      "selectedScenarioId": {
                        "maxLength": 80,
                        "minLength": 1,
                        "type": "string"
                      },
                      "sliders": {
                        "properties": {
                          "complexity": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "coordination": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "integrationBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "onboarding": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "parallelizable": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "qaBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "reviewBottleneck": {
                            "maximum": 100,
                            "minimum": 0,
                            "type": "number"
                          },
                          "teamSize": {
                            "maximum": 100,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "feature",
                      "baseline",
                      "scenarios",
                      "sliders",
                      "selectedScenarioId"
                    ],
                    "type": "object"
                  },
                  "name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "projectId": {
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "type": "string"
                  },
                  "resourceCatalog": {
                    "not": {}
                  },
                  "status": {
                    "enum": [
                      "live",
                      "discovery",
                      "closed"
                    ],
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "clientId",
                  "projectId",
                  "name",
                  "status",
                  "inputs",
                  "currency",
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL capacity workflow",
                    "value": {
                      "clientId": "22222222-2222-4222-8222-222222222222",
                      "createdAt": "2026-10-01T08:15:25.125Z",
                      "currency": "USD",
                      "id": "33333333-3333-4333-8333-333333333333",
                      "inputs": {
                        "baseline": {
                          "baseWeeks": 12,
                          "designerPct": 20,
                          "engCost": 24000,
                          "engineers": 1,
                          "existingLoad": 0,
                          "leadPct": 20,
                          "otherCost": 9500,
                          "pmPct": 30,
                          "qa": 0,
                          "qaCost": 7500,
                          "teamAvailability": 100
                        },
                        "feature": {
                          "complexity": "medium",
                          "deadline": null,
                          "dependency": "medium",
                          "name": "Untitled feature",
                          "notes": "",
                          "objective": "",
                          "parallelizable": 55,
                          "productUncertainty": "medium",
                          "techUncertainty": "medium",
                          "value": ""
                        },
                        "scenarios": [
                          {
                            "add": [],
                            "badge": null,
                            "id": "s-base",
                            "name": "Baseline team",
                            "sub": "No extra capacity",
                            "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                          },
                          {
                            "add": [
                              {
                                "n": 1,
                                "resource": "int"
                              }
                            ],
                            "badge": "rec",
                            "id": "s-a",
                            "name": "Scenario A",
                            "sub": "Add 1 senior engineer",
                            "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                          },
                          {
                            "add": [
                              {
                                "n": 3,
                                "resource": "con"
                              }
                            ],
                            "badge": "warn",
                            "id": "s-b",
                            "name": "Scenario B",
                            "sub": "Add 3 contractors",
                            "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                          },
                          {
                            "add": [
                              {
                                "n": 4,
                                "resource": "agc"
                              }
                            ],
                            "badge": "bad",
                            "id": "s-c",
                            "name": "Scenario C",
                            "sub": "External agency pod",
                            "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                          }
                        ],
                        "selectedScenarioId": "s-a",
                        "sliders": {
                          "complexity": 60,
                          "coordination": 55,
                          "integrationBottleneck": 50,
                          "onboarding": 50,
                          "parallelizable": 55,
                          "qaBottleneck": 35,
                          "reviewBottleneck": 40,
                          "teamSize": 4
                        }
                      },
                      "modelVersion": "dashboard-simulator-v1",
                      "name": "Reviewed capacity forecast",
                      "projectId": "11111111-1111-4111-8111-111111111111",
                      "resourceCatalog": [
                        {
                          "icon": "int",
                          "id": "int",
                          "monthly": 24000,
                          "name": "Internal engineer",
                          "onboardLoad": 0.3,
                          "overhead": 0.6,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Existing team, immediate alignment"
                        },
                        {
                          "icon": "con",
                          "id": "con",
                          "monthly": 13000,
                          "name": "Contractor",
                          "onboardLoad": 0.6,
                          "overhead": 0.8,
                          "prod": 90,
                          "ramp": 2,
                          "sub": "Independent, project-scoped"
                        },
                        {
                          "icon": "agc",
                          "id": "agc",
                          "monthly": 13000,
                          "name": "External agency dev",
                          "onboardLoad": 0.9,
                          "overhead": 1,
                          "prod": 85,
                          "ramp": 3,
                          "sub": "Vendor pod or staff aug"
                        },
                        {
                          "icon": "qa",
                          "id": "qa",
                          "monthly": 7500,
                          "name": "QA / test engineer",
                          "onboardLoad": 0.3,
                          "overhead": 0.5,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Releases bottleneck on test cycles"
                        },
                        {
                          "icon": "pm",
                          "id": "pm",
                          "monthly": 9500,
                          "name": "Product manager",
                          "onboardLoad": 0.2,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Reduces clarification overhead"
                        },
                        {
                          "icon": "pm",
                          "id": "des",
                          "monthly": 9500,
                          "name": "Designer",
                          "onboardLoad": 0.3,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Front-loads UX surface work"
                        },
                        {
                          "icon": "int",
                          "id": "lead",
                          "monthly": 14000,
                          "name": "Tech lead / architect",
                          "onboardLoad": 0.2,
                          "overhead": 0.3,
                          "prod": 110,
                          "ramp": 0,
                          "sub": "Improves review throughput"
                        },
                        {
                          "icon": "qa",
                          "id": "ops",
                          "monthly": 12000,
                          "name": "DevOps / platform",
                          "onboardLoad": 0.3,
                          "overhead": 0.4,
                          "prod": 100,
                          "ramp": 1,
                          "sub": "Unblocks integration bottlenecks"
                        }
                      ],
                      "result": {
                        "addedCost": 32536.383051354376,
                        "baseCost": 45090.93349181073,
                        "confLabel": "Medium",
                        "confScore": 70,
                        "effectiveN": 3.1702001188825046,
                        "effectiveRatio": 0.7925500297206262,
                        "grossN": 4,
                        "monthlyBurn": 54650,
                        "rampWeeksLost": 0.56,
                        "speedup": 1.9704091262659347,
                        "totalCost": 77627.3165431651,
                        "usedAlpha": 0.8724999999999999,
                        "usedParallel": 0.55,
                        "weeks": 6.370105775515186
                      },
                      "status": "discovery",
                      "updatedAt": "2026-10-01T08:15:25.137Z",
                      "version": 2
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "clientId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                      "type": "string"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "inputs": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "baseWeeks": {
                              "exclusiveMinimum": 0,
                              "maximum": 1000,
                              "type": "number"
                            },
                            "designerPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "engCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "engineers": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "existingLoad": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "leadPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "otherCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "pmPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qa": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "qaCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamAvailability": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            }
                          },
                          "required": [
                            "engineers",
                            "qa",
                            "pmPct",
                            "designerPct",
                            "leadPct",
                            "engCost",
                            "qaCost",
                            "otherCost",
                            "teamAvailability",
                            "existingLoad",
                            "baseWeeks"
                          ],
                          "type": "object"
                        },
                        "feature": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "enum": [
                                "low",
                                "medium",
                                "high",
                                "very-high"
                              ],
                              "type": "string"
                            },
                            "deadline": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "dependency": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "notes": {
                              "maxLength": 4000,
                              "type": "string"
                            },
                            "objective": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "productUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "techUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "maxLength": 2000,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "objective",
                            "value",
                            "complexity",
                            "dependency",
                            "techUncertainty",
                            "productUncertainty",
                            "deadline",
                            "notes",
                            "parallelizable"
                          ],
                          "type": "object"
                        },
                        "scenarios": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "add": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "n": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "resource": {
                                      "maxLength": 40,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "resource",
                                    "n"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "type": "array"
                              },
                              "badge": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "rec",
                                      "warn",
                                      "bad"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "sub": {
                                "maxLength": 300,
                                "type": "string"
                              },
                              "tradeoffs": {
                                "maxLength": 2000,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "sub",
                              "add",
                              "badge",
                              "tradeoffs"
                            ],
                            "type": "object"
                          },
                          "maxItems": 20,
                          "minItems": 1,
                          "type": "array"
                        },
                        "selectedScenarioId": {
                          "maxLength": 80,
                          "minLength": 1,
                          "type": "string"
                        },
                        "sliders": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "coordination": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "integrationBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "onboarding": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qaBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "reviewBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamSize": {
                              "maximum": 100,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "feature",
                        "baseline",
                        "scenarios",
                        "sliders",
                        "selectedScenarioId"
                      ],
                      "type": "object"
                    },
                    "modelVersion": {
                      "const": "dashboard-simulator-v1",
                      "type": "string"
                    },
                    "name": {
                      "maxLength": 200,
                      "minLength": 1,
                      "type": "string"
                    },
                    "projectId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    "resourceCatalog": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "icon": {
                            "maxLength": 40,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 40,
                            "minLength": 1,
                            "type": "string"
                          },
                          "monthly": {
                            "maximum": 10000000,
                            "minimum": 0,
                            "type": "number"
                          },
                          "name": {
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "onboardLoad": {
                            "maximum": 10,
                            "minimum": 0,
                            "type": "number"
                          },
                          "overhead": {
                            "maximum": 10,
                            "minimum": 0,
                            "type": "number"
                          },
                          "prod": {
                            "maximum": 200,
                            "minimum": 0,
                            "type": "number"
                          },
                          "ramp": {
                            "maximum": 52,
                            "minimum": 0,
                            "type": "number"
                          },
                          "sub": {
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "sub",
                          "icon",
                          "ramp",
                          "monthly",
                          "prod",
                          "overhead",
                          "onboardLoad"
                        ],
                        "type": "object"
                      },
                      "maxItems": 20,
                      "minItems": 1,
                      "type": "array"
                    },
                    "result": {
                      "additionalProperties": false,
                      "properties": {
                        "addedCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "baseCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "confLabel": {
                          "enum": [
                            "High",
                            "Medium",
                            "Low"
                          ],
                          "type": "string"
                        },
                        "confScore": {
                          "maximum": 95,
                          "minimum": 30,
                          "type": "integer"
                        },
                        "effectiveN": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "effectiveRatio": {
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "grossN": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "monthlyBurn": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "rampWeeksLost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "speedup": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "totalCost": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "usedAlpha": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        },
                        "usedParallel": {
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "weeks": {
                          "exclusiveMinimum": 0,
                          "type": "number"
                        }
                      },
                      "required": [
                        "weeks",
                        "totalCost",
                        "baseCost",
                        "addedCost",
                        "monthlyBurn",
                        "grossN",
                        "effectiveN",
                        "effectiveRatio",
                        "speedup",
                        "confScore",
                        "confLabel",
                        "rampWeeksLost",
                        "usedParallel",
                        "usedAlpha"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "live",
                        "discovery",
                        "closed"
                      ],
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                      "type": "string"
                    },
                    "version": {
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "projectId",
                    "name",
                    "status",
                    "inputs",
                    "currency",
                    "resourceCatalog",
                    "result",
                    "modelVersion",
                    "version",
                    "createdAt",
                    "updatedAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update a saved capacity forecast",
        "tags": [
          "scenarios"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "simulator.manage",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Costs are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.",
            "Inputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.",
            "Updates retain the frozen currency and catalog and require the observed positive version.",
            "Write never implies Delete; legacy keys retain only their original reviewed reads."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scenarios:write",
          "stability": "stable"
        },
        "x-wire-schema-override": "JSON cannot represent undefined. The optional resourceCatalog is forbidden on PATCH; the runtime accepts only omission/undefined and retains the stored catalog. The wire override uses never, preserving every other field and refinement."
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/simulator/seed": {
      "get": {
        "description": "Read eligible history, rates, assumptions and clearly labelled editable defaults for one project and period. Missing evidence stays unavailable; rate cards use transparent monthly equivalents of 160 hours or 20 days. No algorithm or external service runs. Explicit key scope, current creator actions, tenant/project access and RLS apply on every request and replay.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nCosts are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.\n\nInputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.\n\nUpdates retain the frozen currency and catalog and require the observed positive version.\n\nWrite never implies Delete; legacy keys retain only their original reviewed reads.",
        "operationId": "scenarios.seed",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "11111111-1111-4111-8111-111111111111",
            "in": "query",
            "name": "projectId",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            }
          },
          {
            "example": "2026-01-01",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "2026-03-31",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "type": "string"
            }
          },
          {
            "example": "UTC",
            "in": "query",
            "name": "tz",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic PostgreSQL capacity workflow",
                    "value": {
                      "canWrite": true,
                      "seed": {
                        "baseline": {
                          "baseWeeks": 12,
                          "designerPct": 20,
                          "engCost": 24000,
                          "engineers": 1,
                          "existingLoad": 0,
                          "leadPct": 20,
                          "otherCost": 9500,
                          "pmPct": 30,
                          "qa": 0,
                          "qaCost": 7500,
                          "teamAvailability": 100
                        },
                        "clientId": "22222222-2222-4222-8222-222222222222",
                        "currency": "USD",
                        "feature": {
                          "complexity": "medium",
                          "deadline": null,
                          "dependency": "medium",
                          "name": "Untitled feature",
                          "notes": "",
                          "objective": "",
                          "parallelizable": 55,
                          "productUncertainty": "medium",
                          "techUncertainty": "medium",
                          "value": ""
                        },
                        "historicals": {
                          "aiSharePct": null,
                          "medianCycleWeeks": null,
                          "reviewCycles": null,
                          "throughputPerWeek": 0.15555555555555556
                        },
                        "projectId": "11111111-1111-4111-8111-111111111111",
                        "resourceCatalog": [
                          {
                            "icon": "int",
                            "id": "int",
                            "monthly": 24000,
                            "name": "Internal engineer",
                            "onboardLoad": 0.3,
                            "overhead": 0.6,
                            "prod": 100,
                            "ramp": 1,
                            "sub": "Existing team, immediate alignment"
                          },
                          {
                            "icon": "con",
                            "id": "con",
                            "monthly": 13000,
                            "name": "Contractor",
                            "onboardLoad": 0.6,
                            "overhead": 0.8,
                            "prod": 90,
                            "ramp": 2,
                            "sub": "Independent, project-scoped"
                          },
                          {
                            "icon": "agc",
                            "id": "agc",
                            "monthly": 13000,
                            "name": "External agency dev",
                            "onboardLoad": 0.9,
                            "overhead": 1,
                            "prod": 85,
                            "ramp": 3,
                            "sub": "Vendor pod or staff aug"
                          },
                          {
                            "icon": "qa",
                            "id": "qa",
                            "monthly": 7500,
                            "name": "QA / test engineer",
                            "onboardLoad": 0.3,
                            "overhead": 0.5,
                            "prod": 100,
                            "ramp": 1,
                            "sub": "Releases bottleneck on test cycles"
                          },
                          {
                            "icon": "pm",
                            "id": "pm",
                            "monthly": 9500,
                            "name": "Product manager",
                            "onboardLoad": 0.2,
                            "overhead": 0.4,
                            "prod": 100,
                            "ramp": 1,
                            "sub": "Reduces clarification overhead"
                          },
                          {
                            "icon": "pm",
                            "id": "des",
                            "monthly": 9500,
                            "name": "Designer",
                            "onboardLoad": 0.3,
                            "overhead": 0.4,
                            "prod": 100,
                            "ramp": 1,
                            "sub": "Front-loads UX surface work"
                          },
                          {
                            "icon": "int",
                            "id": "lead",
                            "monthly": 14000,
                            "name": "Tech lead / architect",
                            "onboardLoad": 0.2,
                            "overhead": 0.3,
                            "prod": 110,
                            "ramp": 0,
                            "sub": "Improves review throughput"
                          },
                          {
                            "icon": "qa",
                            "id": "ops",
                            "monthly": 12000,
                            "name": "DevOps / platform",
                            "onboardLoad": 0.3,
                            "overhead": 0.4,
                            "prod": 100,
                            "ramp": 1,
                            "sub": "Unblocks integration bottlenecks"
                          }
                        ],
                        "scenarios": [
                          {
                            "add": [],
                            "badge": null,
                            "id": "s-base",
                            "name": "Baseline team",
                            "sub": "No extra capacity",
                            "tradeoffs": "Slowest of the four options, but cheapest and most predictable."
                          },
                          {
                            "add": [
                              {
                                "n": 1,
                                "resource": "int"
                              }
                            ],
                            "badge": "rec",
                            "id": "s-a",
                            "name": "Scenario A",
                            "sub": "Add 1 senior engineer",
                            "tradeoffs": "Best cost-per-week-saved. Adds modest review overhead but stays inside the team operating model."
                          },
                          {
                            "add": [
                              {
                                "n": 3,
                                "resource": "con"
                              }
                            ],
                            "badge": "warn",
                            "id": "s-b",
                            "name": "Scenario B",
                            "sub": "Add 3 contractors",
                            "tradeoffs": "Faster delivery, but onboarding eats 2 weeks. Coordination overhead is meaningful at this size."
                          },
                          {
                            "add": [
                              {
                                "n": 4,
                                "resource": "agc"
                              }
                            ],
                            "badge": "bad",
                            "id": "s-c",
                            "name": "Scenario C",
                            "sub": "External agency pod",
                            "tradeoffs": "Only justifiable if the deadline is immovable. Cost-per-week-saved is ~3× Scenario A."
                          }
                        ],
                        "sliders": {
                          "complexity": 60,
                          "coordination": 55,
                          "integrationBottleneck": 50,
                          "onboarding": 50,
                          "parallelizable": 55,
                          "qaBottleneck": 35,
                          "reviewBottleneck": 40,
                          "teamSize": 4
                        },
                        "sources": {
                          "baseline": {
                            "note": "Aggregate completed-work and eligible epic-cycle evidence is available for the selected period; each editable field identifies whether it uses that evidence or a default.",
                            "source": "history"
                          },
                          "fields": {
                            "baseline": {
                              "baseWeeks": "default",
                              "designerPct": "default",
                              "engCost": "rate_card",
                              "engineers": "default",
                              "existingLoad": "default",
                              "leadPct": "default",
                              "otherCost": "default",
                              "pmPct": "default",
                              "qa": "default",
                              "qaCost": "default",
                              "teamAvailability": "default"
                            },
                            "feature": {
                              "complexity": "default",
                              "deadline": "default",
                              "dependency": "default",
                              "name": "default",
                              "notes": "default",
                              "objective": "default",
                              "parallelizable": "default",
                              "productUncertainty": "default",
                              "techUncertainty": "default",
                              "value": "default"
                            },
                            "historicals": {
                              "aiSharePct": "default",
                              "medianCycleWeeks": "default",
                              "reviewCycles": "default",
                              "throughputPerWeek": "history"
                            },
                            "resourceCatalog": {
                              "agc": "default",
                              "con": "default",
                              "des": "default",
                              "int": "rate_card",
                              "lead": "default",
                              "ops": "default",
                              "pm": "default",
                              "qa": "default"
                            }
                          },
                          "historicals": {
                            "note": "Aggregate throughput, eligible epic-cycle, review, and explicitly self-reported AI evidence for the selected period.",
                            "source": "history"
                          },
                          "rates": {
                            "note": "Monthly equivalents use the current engagement rate card (160 hours or 20 days).",
                            "source": "rate_card"
                          }
                        }
                      }
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "canWrite": {
                      "type": "boolean"
                    },
                    "seed": {
                      "additionalProperties": false,
                      "properties": {
                        "baseline": {
                          "additionalProperties": false,
                          "properties": {
                            "baseWeeks": {
                              "exclusiveMinimum": 0,
                              "maximum": 1000,
                              "type": "number"
                            },
                            "designerPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "engCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "engineers": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "existingLoad": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "leadPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "otherCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "pmPct": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qa": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "qaCost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamAvailability": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            }
                          },
                          "required": [
                            "engineers",
                            "qa",
                            "pmPct",
                            "designerPct",
                            "leadPct",
                            "engCost",
                            "qaCost",
                            "otherCost",
                            "teamAvailability",
                            "existingLoad",
                            "baseWeeks"
                          ],
                          "type": "object"
                        },
                        "clientId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "currency": {
                          "anyOf": [
                            {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feature": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "enum": [
                                "low",
                                "medium",
                                "high",
                                "very-high"
                              ],
                              "type": "string"
                            },
                            "deadline": {
                              "anyOf": [
                                {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "dependency": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "notes": {
                              "maxLength": 4000,
                              "type": "string"
                            },
                            "objective": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "productUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "techUncertainty": {
                              "enum": [
                                "low",
                                "medium",
                                "high"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "maxLength": 2000,
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "objective",
                            "value",
                            "complexity",
                            "dependency",
                            "techUncertainty",
                            "productUncertainty",
                            "deadline",
                            "notes",
                            "parallelizable"
                          ],
                          "type": "object"
                        },
                        "historicals": {
                          "additionalProperties": false,
                          "properties": {
                            "aiSharePct": {
                              "anyOf": [
                                {
                                  "maximum": 100,
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "medianCycleWeeks": {
                              "anyOf": [
                                {
                                  "exclusiveMinimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reviewCycles": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "throughputPerWeek": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "throughputPerWeek",
                            "medianCycleWeeks",
                            "reviewCycles",
                            "aiSharePct"
                          ],
                          "type": "object"
                        },
                        "projectId": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        },
                        "resourceCatalog": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "icon": {
                                "maxLength": 40,
                                "minLength": 1,
                                "type": "string"
                              },
                              "id": {
                                "maxLength": 40,
                                "minLength": 1,
                                "type": "string"
                              },
                              "monthly": {
                                "maximum": 10000000,
                                "minimum": 0,
                                "type": "number"
                              },
                              "name": {
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "onboardLoad": {
                                "maximum": 10,
                                "minimum": 0,
                                "type": "number"
                              },
                              "overhead": {
                                "maximum": 10,
                                "minimum": 0,
                                "type": "number"
                              },
                              "prod": {
                                "maximum": 200,
                                "minimum": 0,
                                "type": "number"
                              },
                              "ramp": {
                                "maximum": 52,
                                "minimum": 0,
                                "type": "number"
                              },
                              "sub": {
                                "maxLength": 300,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "sub",
                              "icon",
                              "ramp",
                              "monthly",
                              "prod",
                              "overhead",
                              "onboardLoad"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "scenarios": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "add": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "n": {
                                      "maximum": 100,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "resource": {
                                      "maxLength": 40,
                                      "minLength": 1,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "resource",
                                    "n"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 20,
                                "type": "array"
                              },
                              "badge": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "rec",
                                      "warn",
                                      "bad"
                                    ],
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "name": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "sub": {
                                "maxLength": 300,
                                "type": "string"
                              },
                              "tradeoffs": {
                                "maxLength": 2000,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "sub",
                              "add",
                              "badge",
                              "tradeoffs"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "sliders": {
                          "additionalProperties": false,
                          "properties": {
                            "complexity": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "coordination": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "integrationBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "onboarding": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "parallelizable": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "qaBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "reviewBottleneck": {
                              "maximum": 100,
                              "minimum": 0,
                              "type": "number"
                            },
                            "teamSize": {
                              "maximum": 100,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        },
                        "sources": {
                          "additionalProperties": false,
                          "properties": {
                            "baseline": {
                              "additionalProperties": false,
                              "properties": {
                                "note": {
                                  "maxLength": 500,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "source": {
                                  "enum": [
                                    "history",
                                    "rate_card",
                                    "onboarding",
                                    "default"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "note"
                              ],
                              "type": "object"
                            },
                            "fields": {
                              "additionalProperties": false,
                              "properties": {
                                "baseline": {
                                  "additionalProperties": {
                                    "enum": [
                                      "history",
                                      "rate_card",
                                      "onboarding",
                                      "default"
                                    ],
                                    "type": "string"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "feature": {
                                  "additionalProperties": {
                                    "enum": [
                                      "history",
                                      "rate_card",
                                      "onboarding",
                                      "default"
                                    ],
                                    "type": "string"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "historicals": {
                                  "additionalProperties": {
                                    "enum": [
                                      "history",
                                      "rate_card",
                                      "onboarding",
                                      "default"
                                    ],
                                    "type": "string"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "resourceCatalog": {
                                  "additionalProperties": {
                                    "enum": [
                                      "history",
                                      "rate_card",
                                      "onboarding",
                                      "default"
                                    ],
                                    "type": "string"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "required": [
                                "feature",
                                "baseline",
                                "resourceCatalog",
                                "historicals"
                              ],
                              "type": "object"
                            },
                            "historicals": {
                              "additionalProperties": false,
                              "properties": {
                                "note": {
                                  "maxLength": 500,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "source": {
                                  "enum": [
                                    "history",
                                    "rate_card",
                                    "onboarding",
                                    "default"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "note"
                              ],
                              "type": "object"
                            },
                            "rates": {
                              "additionalProperties": false,
                              "properties": {
                                "note": {
                                  "maxLength": 500,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "source": {
                                  "enum": [
                                    "history",
                                    "rate_card",
                                    "onboarding",
                                    "default"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "note"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "baseline",
                            "rates",
                            "historicals",
                            "fields"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "clientId",
                        "projectId",
                        "currency",
                        "feature",
                        "baseline",
                        "resourceCatalog",
                        "scenarios",
                        "sliders",
                        "historicals",
                        "sources"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "seed",
                    "canWrite"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read project capacity seed inputs",
        "tags": [
          "scenarios"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "simulator.read",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Costs are scenario currency units (not integer cents), time is weeks and allocations/availability are percentages. These forecasts are not booked costs or achieved savings.",
            "Inputs retain the shared bounds: staffing and added counts 0–100, percentages 0–100, positive baseWeeks up to 1000, bounded resource costs and supported scenario/resource identities.",
            "Updates retain the frozen currency and catalog and require the observed positive version.",
            "Write never implies Delete; legacy keys retain only their original reviewed reads."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "scenarios:read",
          "stability": "stable"
        }
      }
    },
    "/organizations/{organizationSlug}/workspaces/{workspaceSlug}/time-entries": {
      "post": {
        "description": "State hours for an existing project/engagement or an explicitly unattributed row. Person values are aliases. Existing manual natural identities update rather than duplicate; no hourly price is invented. Exact scope and current creator action are required. Writes retain the owner/admin check even when a supplemental role grants an action. Foreign/missing references return 404, invalid input 400, closed/conflicting work 409. Required Idempotency-Key safely replays identical normalized requests without repeated rows/audit/mapping charges. Throttling returns 429 with Retry-After. Shared domain schemas retain money/date/unit semantics.\n\nCurrent creator role and workspace/project access are required.\n\nPlan quotas, reporting windows and available evidence apply separately from endpoint eligibility.\n\nEngagement/project references belong to the same workspace and each other, with current creator dataset access.\n\nRaw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.\n\nPartial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.\n\nHistory distinguishes uncommitted uploads, committed counts, skips and failure.",
        "operationId": "commercial.timeEntry",
        "parameters": [
          {
            "example": "example-org",
            "in": "path",
            "name": "organizationSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-workspace",
            "in": "path",
            "name": "workspaceSlug",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "maxLength": 48,
              "minLength": 2,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
              "type": "string"
            }
          },
          {
            "example": "example-commercial.timeEntry",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[\\x21-\\x7e]{1,200}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "synthetic1": {
                  "value": {
                    "billable": true,
                    "engagementId": "22222222-2222-4222-8222-222222222222",
                    "hours": 2,
                    "personExternalId": "example-engineer",
                    "projectId": "11111111-1111-4111-8111-111111111111",
                    "role": "Engineer",
                    "workedOn": "2026-10-01"
                  }
                }
              },
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "billable": {
                    "default": true,
                    "type": "boolean"
                  },
                  "engagementId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hours": {
                    "maximum": 8784,
                    "minimum": 0,
                    "type": "number"
                  },
                  "note": {
                    "anyOf": [
                      {
                        "maxLength": 1000,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "personExternalId": {
                    "anyOf": [
                      {
                        "maxLength": 512,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projectId": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "role": {
                    "anyOf": [
                      {
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "workedOn": {
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "workItemExternalKey": {
                    "anyOf": [
                      {
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "workedOn",
                  "hours"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "synthetic1": {
                    "summary": "Synthetic import workflow",
                    "value": {
                      "created": true,
                      "id": "11111111-1111-4111-8111-111111111111"
                    }
                  }
                },
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "additionalProperties": false,
                  "properties": {
                    "created": {
                      "type": "boolean"
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "created"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "private, no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "The request is invalid.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "unauthenticated": {
                    "value": {
                      "error": {
                        "code": "unauthenticated",
                        "message": "A valid API key is required.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "forbidden": {
                    "value": {
                      "error": {
                        "code": "forbidden",
                        "message": "This operation is not permitted.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "quota_exceeded": {
                    "value": {
                      "error": {
                        "code": "quota_exceeded",
                        "message": "The current plan limit was reached.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "not_found": {
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Resource not found.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "conflict": {
                    "value": {
                      "error": {
                        "code": "conflict",
                        "message": "The request conflicts with current state.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "idempotency_conflict": {
                    "value": {
                      "error": {
                        "code": "idempotency_conflict",
                        "message": "This idempotency key was used with a different request.",
                        "requestId": "example_request_id"
                      }
                    }
                  },
                  "operation_in_progress": {
                    "value": {
                      "error": {
                        "code": "operation_in_progress",
                        "message": "This operation is pending. Retry later with the same idempotency key.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry later.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait; revalidate permissions and preserve the original idempotency key.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "internal_error": {
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "The request could not be completed.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          },
          "503": {
            "content": {
              "application/json": {
                "examples": {
                  "temporarily_unavailable": {
                    "value": {
                      "error": {
                        "code": "temporarily_unavailable",
                        "message": "The service is temporarily unavailable.",
                        "requestId": "example_request_id"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            },
            "description": "Closed error contract. See error.code for recovery."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert manual tracked time",
        "tags": [
          "commercial"
        ],
        "x-badges": [
          {
            "name": "free",
            "position": "before"
          },
          {
            "name": "starter",
            "position": "before"
          },
          {
            "name": "growth",
            "position": "before"
          },
          {
            "name": "scale",
            "position": "before"
          },
          {
            "name": "free (legacy)",
            "position": "before"
          },
          {
            "name": "entry (legacy)",
            "position": "before"
          },
          {
            "name": "growth (legacy)",
            "position": "before"
          }
        ],
        "x-scopeworth": {
          "action": "commercial.edit",
          "caveats": [
            "Current creator role and workspace/project access are required.",
            "Plan quotas, reporting windows and available evidence apply separately from endpoint eligibility.",
            "Engagement/project references belong to the same workspace and each other, with current creator dataset access.",
            "Raw files are bounded bytes, never multipart; filenames use valid percent encoding without control characters.",
            "Partial AI aggregate imports are unavailable and deterministic mapping never calls a paid model.",
            "History distinguishes uncommitted uploads, committed counts, skips and failure."
          ],
          "legacyPlans": [
            "free",
            "entry",
            "growth"
          ],
          "mutation": {
            "execution": "database",
            "idempotency": "required"
          },
          "plans": [
            "free",
            "starter",
            "growth",
            "scale"
          ],
          "policyId": "workspace-access",
          "scope": "commercial:write",
          "stability": "stable"
        }
      }
    }
  },
  "servers": [
    {
      "description": "Combined ScopeWorth host; use the verified regional API origin and /v1 for direct cell access.",
      "url": "/api/v1"
    }
  ],
  "tags": [
    {
      "name": "administration"
    },
    {
      "name": "assumptions"
    },
    {
      "name": "clients"
    },
    {
      "name": "commercial"
    },
    {
      "name": "evidence"
    },
    {
      "name": "imports"
    },
    {
      "name": "intelligence"
    },
    {
      "name": "investigations"
    },
    {
      "name": "reports"
    },
    {
      "name": "scenarios"
    }
  ]
}
