{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://axis.efeonce.org/contracts/candidate/surface-composition-intent.v0.1.schema.json",
  "title": "Efeonce «La órbita» by surface — composition intent (efeonce.surface-composition 0.1.2, candidate)",
  "description": "Agent-authored intent for a piece on web, DOOH, pDOOH, motion, audiovisual or deck. Resolve it with pnpm surface:resolve (manifest axis.surface-composition.v1). Values live in efeonceGraphicLine.surfaces; the intent carries copy and choices, never coordinates or timings. Generated from the tokens: recipe, role and format ids per surface below. Each version is additive: an intent that declares 0.1.0 or 0.1.1 still resolves as it did (the fields later versions added are ignored for it and nothing new is required of it). 0.1.2 adds `use` (proposal or brochure), `layout` and `lines` (proposal-cinematic), `selection.anchor`, the `lines` selection target and the approved deck cover and close (`cover-classic`, `close-classic`). 2026-09-27 (b), same version: the brochure and proposal covers and closes (`cover-brochure`, `cover-proposal`, `close-brochure`, `close-proposal`, each bound to its use) and `section-cine`, their layouts, and the `client-logo` selection target. Several pages of one surface (a brochure) are a DOCUMENT: see surface-document-intent.schema.json.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "surface"
  ],
  "properties": {
    "contract": {
      "const": "efeonce.surface-composition"
    },
    "version": {
      "enum": [
        "0.1.0",
        "0.1.1",
        "0.1.2"
      ],
      "description": "0.1.1 adds levels, note, panels, figures, nav, title, frames, chapter, shots, subtitles, photo.native, photo.focus, selection.level and selection.box; 0.1.2 adds use, layout, lines and selection.anchor. An older intent still resolves as it did."
    },
    "surface": {
      "enum": [
        "web",
        "dooh",
        "pdooh",
        "motion",
        "audiovisual",
        "deck"
      ]
    },
    "format": {
      "type": "string",
      "description": "A format id of the surface. Defaults to the recipe's first format."
    },
    "role": {
      "type": "string",
      "description": "The role of the piece in the surface. With no recipe, the first approved recipe of the role is used."
    },
    "recipe": {
      "type": "string",
      "description": "A recipe id of the surface (see efeonceGraphicLine.surfaces.<surface>.recipes and its status)."
    },
    "use": {
      "enum": [
        "proposal",
        "brochure"
      ],
      "description": "0.1.2 · Deck: `proposal` (a deck someone presents) or `brochure` (the 16:9 PDF sent or left after a meeting). Defaults to `proposal` when the recipe admits it, else its only use. Approved deck recipes admit both (since 2026-09-27 (c) every deck recipe is approved); an option only `proposal`; a frame only its document (`cover-brochure`/`close-brochure`: brochure; `cover-proposal`/`close-proposal`, `cover-classic`/`close-classic`: proposal) (`use-not-for-recipe`). With `role` and no `recipe`, the use picks the frame that admits it."
    },
    "layout": {
      "type": "string",
      "minLength": 1,
      "description": "0.1.2 · A composition of the recipe: proposal-cinematic has `service` (default: voice, body, optional proof with its source, up to four steps), `hero` (eyebrow, voice and body; no proof, no steps) and `lines` (eyebrow, the phrase in `body` and the stack of service lines; no question, no answer). 2026-09-27 (b): cover-brochure `document` (default) · `line`; cover-proposal `orbit` (default) · `dawn` · `orbit-decision` (2026-10-20: eyebrow, the title in `voice.answer` and `body`; no question); close-brochure `orbit` (default, no photo) · `photo`; section-cine `team` (default) · `services`. 2026-09-27 (c): section-split `corner-top` · `corner-bottom` · `panel-end` (no default: without a layout it resolves as `corner-top` did). Issues: layout-invalid, layout-not-in-recipe, layout-field-required, layout-field-not-allowed."
    },
    "lines": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "enum": [
          "growth",
          "brand",
          "engine",
          "voice",
          "revenue-hubspot",
          "revenue-salesforce"
        ]
      },
      "description": "0.1.2 · Only with layout `lines`: which service lines the stack shows, in order (keys of efeonceGraphicLine.lines). Defaults to growth, brand, engine, voice and revenue-hubspot. Name, slogan word and accent come from tokens."
    },
    "line": {
      "enum": [
        "growth",
        "brand",
        "engine",
        "voice",
        "revenue-hubspot",
        "revenue-salesforce"
      ],
      "default": "growth"
    },
    "theme": {
      "enum": [
        "dark",
        "light"
      ],
      "default": "dark",
      "description": "A line piece (line other than growth) keeps the Efeonce dark ground; the line only brings the accent."
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "eyebrow": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "question": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "description": "Not allowed where the recipe is answer only (LED wall)."
        },
        "answer": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            {
              "type": "array",
              "minItems": 1,
              "maxItems": 3,
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            }
          ],
          "description": "Lines of the answer; at most 3 words (except a phrase across panels). The sphere closes the last line."
        }
      }
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 400
    },
    "proof": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "text",
        "source"
      ],
      "properties": {
        "text": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "description": "A figure always carries its source."
    },
    "measure": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value",
        "source"
      ],
      "properties": {
        "value": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        }
      }
    },
    "progress": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "sections",
        "current"
      ],
      "properties": {
        "sections": {
          "type": "integer",
          "minimum": 1
        },
        "current": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "steps": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "glyph",
          "name"
        ],
        "properties": {
          "glyph": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "A glyph of @efeoncepro/axis-graphic-line/icons; the voice follows the line."
          },
          "kicker": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "state": {
            "enum": [
              "rest",
              "response"
            ],
            "description": "Steps stay at rest: the piece's sphere is the answer's."
          }
        }
      }
    },
    "levels": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "descriptor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        }
      },
      "description": "Recipes with a levels token (method-staircase): exactly levels.count, from the first to the last."
    },
    "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "A footnote of the slide (a caveat, a scope line). Never a figure without its source."
    },
    "panels": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "plateRef",
          "alt"
        ],
        "properties": {
          "plateRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "alt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "register": {
            "enum": [
              "documental",
              "puesta-en-escena",
              "respuesta",
              "cine"
            ]
          },
          "subject": {
            "enum": [
              "person",
              "nexa",
              "object",
              "place"
            ]
          },
          "focus": {
            "type": "object",
            "additionalProperties": false,
            "minProperties": 1,
            "properties": {
              "xOfWidth": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "yOfHeight": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "description": "Where the subject (the face) sits in the FILE, as fractions of its width and height."
          }
        }
      },
      "description": "Recipes with a panels token (triptych: 3, split-screen: 2): exactly panels.count photos, each with its alt."
    },
    "figures": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "label",
          "source"
        ],
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "description": "Supporting figures where the recipe has a figures token (content-measure: up to 2). Never without source."
    },
    "photo": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "register": {
          "enum": [
            "documental",
            "puesta-en-escena",
            "respuesta",
            "cine"
          ],
          "description": "cine only with Nexa as the protagonist or in the deck's cinema recipes (efeonceGraphicLine.surfaces.photo.cine.recipes: proposal-cinematic, cover-brochure, close-brochure, close-proposal, section-cine)."
        },
        "subject": {
          "enum": [
            "person",
            "nexa",
            "object",
            "place"
          ]
        },
        "plateRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "alt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300,
          "description": "Required when the recipe carries a lens or a spotlight."
        },
        "native": {
          "type": "string",
          "pattern": "^\\d+(\\.\\d+)?:\\d+(\\.\\d+)?$",
          "description": "The aspect of the plate file (\"4:7\"): a shot made for the lens is placed by its focus, never by a centered crop."
        },
        "focus": {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "xOfWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "yOfHeight": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          },
          "description": "Where the subject (the face) sits in the FILE, as fractions of its width and height."
        }
      }
    },
    "selection": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "target": {
          "enum": [
            "answer",
            "cta",
            "object",
            "level",
            "lines",
            "client-logo"
          ],
          "description": "`level` only where the recipe has levels (method-staircase); `lines` only in the `lines` layout of proposal-cinematic (the stack, as a group), where it is the only target; `client-logo` only where the recipe's selection takes the client's logo (cover-proposal)."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "participantKind": {
          "enum": [
            "person",
            "role",
            "department"
          ]
        },
        "level": {
          "type": "integer",
          "minimum": 1,
          "description": "The step the selection takes (1-based) when the target is `level`."
        },
        "box": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "left",
            "top",
            "right",
            "bottom"
          ],
          "properties": {
            "left": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "top": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "right": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "bottom": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          },
          "description": "Only where the recipe's selection takes the box from the intent (callout-selection): the object's box as fractions of the canvas, left < right and top < bottom."
        },
        "anchor": {
          "enum": [
            "top-start",
            "top-end",
            "bottom-start",
            "bottom-end"
          ],
          "description": "0.1.2 · The corner of the collaborator when the approved slide moves it from the recipe's (the RevOps proposal: bottom-end)."
        }
      }
    },
    "cta": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "descriptor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        }
      },
      "description": "Web only."
    },
    "nav": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "links",
        "action"
      ],
      "properties": {
        "links": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30
          }
        },
        "action": {
          "type": "string",
          "minLength": 1,
          "maxLength": 30
        }
      },
      "description": "Web only: the site header's links and its action. The logo comes from the signature."
    },
    "timeline": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "close": {
          "enum": [
            "reveal",
            "sting"
          ]
        },
        "loop": {
          "type": "boolean"
        },
        "durationMs": {
          "type": "integer",
          "description": "Only to restate the recipe duration from tokens; any other value is timings-from-tokens."
        }
      }
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "description": "A sheet's title: only recipes with sheetTitle (motion storyboard, audiovisual shot-plan)."
    },
    "frames": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "segment",
          "title",
          "caption"
        ],
        "properties": {
          "segment": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "caption": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          }
        }
      },
      "description": "Motion storyboard: one frame per segment of the surface timeline, in its order."
    },
    "chapter": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "title"
      ],
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 30
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        }
      },
      "description": "Audiovisual opening title (cartela): the chapter's word inside the ring and an optional label. Number and total come from progress."
    },
    "shots": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "segment",
          "title",
          "spec",
          "note",
          "plateRef",
          "alt"
        ],
        "properties": {
          "segment": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "spec": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "plateRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400
          },
          "alt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "lensMm": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "description": "Audiovisual shot plan: one shot per timeline segment. Lens and duration are the segment's; lensMm and any lens or duration the spec names must match them."
    },
    "subtitles": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "lines"
      ],
      "properties": {
        "lines": {
          "type": "array",
          "minItems": 1,
          "maxItems": 2,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        }
      },
      "description": "Burned-in subtitles: the lines of one intervention, at most type.subtitle.maxLines of the recipe."
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slot",
          "answer"
        ],
        "properties": {
          "slot": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "question": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        }
      }
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "surface": {
            "const": "web"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "hero-lens",
              "hero-bleed",
              "hero-uniform-tablet",
              "hero-mobile-native"
            ]
          },
          "role": {
            "enum": [
              "hero"
            ]
          },
          "format": {
            "enum": [
              "desktop",
              "phone-360",
              "phone-390",
              "phone-430"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "surface": {
            "const": "dooh"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "caminero-lens",
              "paleta"
            ]
          },
          "role": {
            "enum": [
              "billboard"
            ]
          },
          "format": {
            "enum": [
              "caminero-3x1",
              "paleta-1x2"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "surface": {
            "const": "pdooh"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "led-wall-answer",
              "mupi-story",
              "spot-10s",
              "dynamic-variants"
            ]
          },
          "role": {
            "enum": [
              "screen",
              "spot",
              "variants"
            ]
          },
          "format": {
            "enum": [
              "led-16x9",
              "mupi-9x16"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "surface": {
            "const": "motion"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "loop-lens-reveal",
              "storyboard"
            ]
          },
          "role": {
            "enum": [
              "loop",
              "storyboard"
            ]
          },
          "format": {
            "enum": [
              "16x9"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "surface": {
            "const": "audiovisual"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "shot-plan",
              "cartela",
              "zocalo",
              "callout-selection",
              "data-super",
              "split-screen",
              "subtitles",
              "close-reveal"
            ]
          },
          "role": {
            "enum": [
              "plan",
              "opening-title",
              "lower-third",
              "callout",
              "data-super",
              "split-screen",
              "subtitles",
              "close"
            ]
          },
          "format": {
            "enum": [
              "16x9"
            ]
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "surface": {
            "const": "deck"
          }
        },
        "required": [
          "surface"
        ]
      },
      "then": {
        "properties": {
          "recipe": {
            "enum": [
              "cover-classic",
              "close-classic",
              "cover-brochure",
              "cover-proposal",
              "close-brochure",
              "close-proposal",
              "section-classic",
              "section-split",
              "section-lens",
              "section-bleed",
              "section-cine",
              "content-measure",
              "content-focus",
              "breather",
              "contact-sheet",
              "triptych",
              "proposal-cinematic",
              "method-staircase",
              "content-text",
              "content-bullets",
              "content-team",
              "content-day",
              "content-pricing",
              "content-clients",
              "content-partners",
              "content-stack",
              "decision-agenda",
              "decision-risk",
              "decision-case",
              "decision-plan",
              "decision-chart",
              "decision-testimonial",
              "decision-next-steps",
              "decision-why-us"
            ]
          },
          "role": {
            "enum": [
              "cover",
              "close",
              "section",
              "content",
              "breather",
              "proposal",
              "method",
              "decision"
            ]
          },
          "format": {
            "enum": [
              "16x9"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "layout"
        ],
        "properties": {
          "version": {
            "const": "0.1.2"
          }
        }
      },
      "then": {
        "properties": {
          "surface": {
            "const": "deck"
          },
          "recipe": {
            "enum": [
              "proposal-cinematic",
              "cover-brochure",
              "cover-proposal",
              "close-brochure",
              "section-cine",
              "section-split"
            ]
          },
          "layout": {
            "enum": [
              "corner-bottom",
              "corner-top",
              "dawn",
              "document",
              "hero",
              "line",
              "lines",
              "orbit",
              "orbit-decision",
              "panel-end",
              "photo",
              "service",
              "services",
              "team"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "proposal-cinematic"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "service",
              "hero",
              "lines"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "cover-brochure"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "document",
              "line"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "cover-proposal"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "orbit",
              "dawn",
              "orbit-decision"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "close-brochure"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "orbit",
              "photo"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "section-cine"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "team",
              "services"
            ]
          }
        }
      }
    },
    {
      "if": {
        "required": [
          "recipe",
          "layout"
        ],
        "properties": {
          "recipe": {
            "const": "section-split"
          }
        }
      },
      "then": {
        "properties": {
          "layout": {
            "enum": [
              "corner-top",
              "corner-bottom",
              "panel-end"
            ]
          }
        }
      }
    }
  ]
}
