{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cueframe-ai/json-schema/cueframe-ai-profile-response-schema.json",
  "title": "ProfileResponse",
  "description": "The org's legible taste: brand + critics + references + decision log + learned taste.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cueframe-ai-account-api-openapi.yml#/components/schemas/ProfileResponse",
  "type": "object",
  "properties": {
    "brandKits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "audio": {
            "type": "object",
            "properties": {
              "sfxIntensity": {
                "type": "string",
                "enum": [
                  "off",
                  "light",
                  "standard",
                  "dense"
                ]
              },
              "musicEnabled": {
                "type": "boolean"
              },
              "musicMood": {
                "type": "string",
                "maxLength": 300
              },
              "sonicLogo": {
                "description": "A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory.",
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string",
                    "minLength": 1
                  },
                  "placement": {
                    "type": "string",
                    "enum": [
                      "intro",
                      "outro",
                      "both"
                    ]
                  },
                  "offsetMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "ref",
                  "placement"
                ],
                "additionalProperties": false
              },
              "uiSoundSet": {
                "description": "Per-family SFX overrides (the brand's own tick/pop/…). Highest-priority tier over the org palette + pack default in the compose SFX draw.",
                "type": "object",
                "properties": {
                  "tick": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pop": {
                    "type": "string",
                    "minLength": 1
                  },
                  "impact": {
                    "type": "string",
                    "minLength": 1
                  },
                  "confirm": {
                    "type": "string",
                    "minLength": 1
                  },
                  "error": {
                    "type": "string",
                    "minLength": 1
                  },
                  "whoosh": {
                    "type": "string",
                    "minLength": 1
                  },
                  "riser": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              },
              "bedStyle": {
                "description": "Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed.",
                "type": "object",
                "properties": {
                  "bedId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "genre": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "bpmRange": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "min",
                      "max"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "ambiencePreference": {
                "description": "Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ref": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "ref"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "description": "The org's brand kits (bind one to a project via update_project). `audio` carries the brand sound kit when set."
    },
    "critics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CriticSummary"
      },
      "description": "Registered critics — run in the Director's gates AND score_composition."
    },
    "references": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "thumbnailUrl": {
            "description": "Presigned reference thumbnail (~1 week).",
            "type": "string"
          }
        },
        "required": [
          "mediaId"
        ],
        "additionalProperties": false
      },
      "description": "The union of critic reference media — the org's visual standard, with provenance."
    },
    "recentDecisions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "checkpointId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "gate",
              "score"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "content",
              "layout",
              "motion"
            ]
          },
          "decision": {
            "type": "string"
          },
          "decidedAt": {
            "type": "number"
          }
        },
        "required": [
          "checkpointId",
          "projectId",
          "kind",
          "decision",
          "decidedAt"
        ],
        "additionalProperties": false
      },
      "description": "The last recorded checkpoint decisions — the raw log learned taste is saved from."
    },
    "taste": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TasteEntry"
      },
      "description": "Learned style preferences. Advice only: the current request, its brief, the project and the brand kit, exclusions and critics all take precedence."
    }
  },
  "required": [
    "brandKits",
    "critics",
    "references",
    "recentDecisions",
    "taste"
  ],
  "additionalProperties": false,
  "$defs": {
    "CriticSummary": {
      "type": "object",
      "properties": {
        "criticId": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "tier": {
          "type": "string",
          "enum": [
            "rules",
            "rubric",
            "evaluator"
          ]
        },
        "floor": {
          "type": "number"
        },
        "referenceMediaIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "criticId",
        "label",
        "tier",
        "floor"
      ],
      "additionalProperties": false,
      "description": "One registered critic (rubric/rules/url stay write-only — never echoed)."
    },
    "TasteEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": "string",
          "minLength": 1
        },
        "source": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "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)))$"
        },
        "updatedAt": {
          "type": "string",
          "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)))$"
        }
      },
      "required": [
        "id",
        "text",
        "source",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false,
      "description": "One learned style preference: advice for agents, never enforcement."
    }
  }
}