{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://axis.efeonce.org/contracts/candidate/manzanitas-register-intent.v0.1.schema.json",
  "title": "Marketing con Manzanitas — composition intent (efeonce.manzanitas-register 0.4.0, stable desde 2026-09-29; layout juego desde 2026-11-23)",
  "description": "Intent de un carrusel de Marketing con Manzanitas (o de su pieza única de story, blog, YouTube o pódcast). El registro complementa La órbita, no la reemplaza. Datos, nunca coordenadas ni colores: pnpm manzanitas:resolve toma todos los valores de manzanitasRegister. Las listas de piezas, líneas y canales se verifican contra el token en la prueba del contrato; las reglas de secuencia (Recreo), de una esfera y de fuente de las cifras las verifica el contrato, no este schema.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "register",
    "channel",
    "topicLine",
    "slides"
  ],
  "properties": {
    "contract": {
      "const": "efeonce.manzanitas-register"
    },
    "version": {
      "enum": [
        "0.1.0",
        "0.1.1",
        "0.2.0",
        "0.3.0",
        "0.4.0"
      ]
    },
    "register": {
      "const": "marketing-con-manzanitas"
    },
    "channel": {
      "enum": [
        "carousel",
        "story",
        "blog",
        "youtube",
        "podcast"
      ],
      "description": "carousel lleva varias láminas; story, blog, youtube y podcast, una sola pieza (single-piece-channel)."
    },
    "topicLine": {
      "enum": [
        "growth",
        "brand",
        "engine",
        "voice",
        "revenue-hubspot",
        "revenue-salesforce"
      ],
      "description": "La línea de servicio del tema: decide el acento de la manzana, los puntos, la cifra y la palabra del eslogan. Un tema de Salesforce lleva revenue-salesforce; uno de HubSpot o genérico de Revenue, revenue-hubspot."
    },
    "layout": {
      "enum": [
        "standard",
        "juego"
      ],
      "description": "standard por omisión. juego (juego + datos, operador 2026-11-23) permite fotos seguidas, cuenta la cifra gigante como voz después de una foto y es el único layout donde van game-round, game-reveal, figure-*, game-score e interior-detail-bleed (piece-layout-mismatch)."
    },
    "slides": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/slide"
      }
    }
  },
  "$defs": {
    "slide": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "piece"
      ],
      "properties": {
        "piece": {
          "enum": [
            "cover-pizarra",
            "cover-pizarra-swipe-response",
            "cover-escena",
            "step-pizarra",
            "data-apples-of-ten",
            "interior-escena",
            "interior-lente",
            "chart-measure",
            "chart-ranking",
            "chart-before-after",
            "chart-trend",
            "chart-parts",
            "chart-per-hundred",
            "chart-venn-3",
            "chart-matrix-2x2",
            "chart-funnel",
            "dense-concept",
            "dense-comparison",
            "dense-steps",
            "back-cover-a",
            "close-generic",
            "story-escena",
            "story-close",
            "blog-banner-escena",
            "youtube-thumbnail",
            "youtube-close",
            "podcast-cover",
            "game-round",
            "game-reveal",
            "figure-versus",
            "figure-statement",
            "figure-per-hundred",
            "figure-rating",
            "figure-label",
            "game-score",
            "interior-detail-bleed"
          ],
          "description": "Una pieza de manzanitasRegister.pieces; sólo resuelven las aprobadas (piece-not-approved)."
        },
        "surface": {
          "enum": [
            "navy",
            "paper"
          ],
          "description": "Opcional: si viene, la de la pieza (surface-invalid)."
        },
        "voice": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "question": {
              "type": "string",
              "minLength": 1
            },
            "answer": {
              "type": "string",
              "minLength": 1,
              "description": "Máximo tres palabras (voice-answer-too-long); en la escena de detalle a sangre (interior-detail-bleed), hasta seis. La Medida y la Tendencia llevan sólo la pregunta."
            },
            "sub": {
              "type": "string",
              "minLength": 1
            },
            "lead": {
              "type": "string",
              "minLength": 1,
              "description": "Línea previa a la pregunta (la ronda y el marcador)."
            }
          }
        },
        "chart": {
          "$ref": "#/$defs/chart"
        },
        "denseText": {
          "type": "object",
          "description": "Contenido de la lámina de texto denso (concept-three-points, comparison-two-columns o step-by-step)."
        },
        "photo": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "register": {
              "const": "cine"
            },
            "lightId": {
              "type": "string",
              "minLength": 1,
              "description": "Todas las fotos de un carrusel comparten registro y luz (photos-light-mismatch)."
            },
            "subject": {
              "type": "string",
              "minLength": 1
            },
            "alt": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "swipe": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "state": {
                  "enum": [
                    "rest",
                    "response"
                  ]
                }
              }
            }
          ],
          "description": "La mano «Desliza», en reposo; nunca en la última lámina."
        },
        "slogan": {
          "type": "boolean",
          "description": "Sólo en los cierres (slogan-not-allowed)."
        },
        "mastheadApple": {
          "type": "boolean"
        },
        "accent": {
          "type": "object",
          "additionalProperties": false,
          "description": "Lo que el autor quiere hacer con el acento; el contrato lo compara con la línea del tema.",
          "properties": {
            "color": {
              "type": "string",
              "minLength": 1
            },
            "asSurface": {
              "type": "boolean"
            },
            "textPx": {
              "type": "number"
            }
          }
        },
        "extraSpheres": {
          "type": "integer",
          "minimum": 0
        },
        "simulatedButtons": {
          "type": "boolean"
        },
        "conversions": {
          "type": "integer",
          "minimum": 0
        },
        "glitchElements": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "photos": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "register": {
                "const": "cine"
              },
              "lightId": {
                "type": "string",
                "minLength": 1,
                "description": "Todas las fotos de un carrusel comparten registro y luz (photos-light-mismatch)."
              },
              "subject": {
                "type": "string",
                "minLength": 1
              },
              "alt": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "description": "La ronda (game-round) y la revelación (game-reveal): cuatro fotos, en el mismo orden en las dos (photos-count-invalid)."
        },
        "figure": {
          "$ref": "#/$defs/figure"
        }
      }
    },
    "chart": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "recipe": {
          "enum": [
            "measure",
            "ranking",
            "before-after",
            "trend",
            "parts",
            "per-hundred",
            "venn-3",
            "matrix-2x2",
            "funnel"
          ]
        },
        "value": {
          "type": "number",
          "description": "Medida y De cada 100: 0–100. La lámina de manzanas: 0–10."
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "label",
              "value"
            ],
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1
              },
              "value": {
                "type": "number"
              },
              "role": {
                "enum": [
                  "leader",
                  "you"
                ]
              }
            }
          }
        },
        "before": {
          "type": "number"
        },
        "after": {
          "type": "number"
        },
        "series": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "parts": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "label",
              "value",
              "tone"
            ],
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1
              },
              "value": {
                "type": "number"
              },
              "tone": {
                "enum": [
                  "ink",
                  "neutral",
                  "accent"
                ]
              }
            }
          }
        },
        "labels": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "tasks": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "label",
              "effort",
              "impact"
            ],
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1
              },
              "effort": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "impact": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "focus": {
                "type": "boolean"
              }
            }
          }
        },
        "stages": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "label",
              "value"
            ],
            "properties": {
              "label": {
                "type": "string",
                "minLength": 1
              },
              "value": {
                "type": "number"
              }
            }
          }
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "description": "Fuente de la cifra; con dato de muestra, el marcador [FUENTE, AÑO] y illustrative: true."
        },
        "illustrative": {
          "type": "boolean"
        },
        "caption": {
          "type": "string",
          "minLength": 1,
          "description": "Rótulo del dato (arriba en Ranking, Antes y después y Partes; delante de la fuente en los demás)."
        },
        "figureLabel": {
          "type": "string",
          "minLength": 1,
          "description": "Rótulo dentro del anillo de la Medida («te nombran»)."
        },
        "columnLabels": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 2,
          "maxItems": 2,
          "description": "Rótulos de las columnas de Antes y después."
        },
        "keyLabels": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 2,
          "maxItems": 2,
          "description": "Rótulos de la clave de De cada 100 (el que cuenta y el resto)."
        },
        "rateHeader": {
          "type": "string",
          "minLength": 1,
          "description": "Encabezado de la columna de conversión del Embudo."
        }
      }
    },
    "figure": {
      "type": "object",
      "additionalProperties": false,
      "description": "La cifra gigante del layout juego, calculada del dato (manzanitasRegister.figures). Lleva fuente salvo en la revelación (count) y el marcador (score).",
      "properties": {
        "value": {
          "type": "number",
          "description": "count: fotos reales 0–4 · versus, percent, label: 0–100 · per-hundred: entero 0–100 · rating: 0–max."
        },
        "max": {
          "type": "number",
          "minimum": 1,
          "maximum": 10,
          "description": "rating: el máximo de la escala; las estrellas son su techo y se rellenan con value."
        },
        "base": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "versus: la referencia (por ejemplo, la moneda: 50)."
        },
        "n": {
          "type": "integer",
          "minimum": 2,
          "maximum": 20,
          "description": "score: cuántas caras hay que adivinar."
        },
        "lead": {
          "type": "string",
          "minLength": 1
        },
        "statement": {
          "type": "string",
          "minLength": 1
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "description": "label: el texto de la etiqueta."
        },
        "tags": {
          "type": "array",
          "maxItems": 4,
          "items": {
            "type": "string",
            "minLength": 1
          },
          "description": "count: una etiqueta por foto."
        },
        "items": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "type": "string",
            "minLength": 1
          },
          "description": "label: hasta tres puntos."
        },
        "source": {
          "type": "string",
          "minLength": 1
        },
        "illustrative": {
          "type": "boolean"
        }
      }
    }
  }
}
