---
name: branching-editions
description: Animate a research chain that contracts into a header and distributes into several editorial formats.
version: 1.0.2
---

# Branching Editions

Build a 7.4-second editable diagram at 1920 × 1080 and 30 fps. This is a parameterized renderer for a specific relationship: documents enter in sequence, their connecting arrows stay attached during a group contraction, and drawn routes lead to distinct output symbols. It does not invent a complete film from an unrestricted prompt.

## Prepare a brief

Author JSON containing `title` (up to 48 characters), `palette` (`lagoon`, `plum`, `parchment`, `graphite`), optional `language: "zh-CN"`, `documents` (1–3 objects), and `editions` (2–5 objects).

Each document requires `label` (22 characters), `caption` (35 characters), `image` (local JPEG, PNG or WebP, relative to the brief), `alt` (180 characters), and `rights` (3,000 characters). Character limits are maxima. Use readable, licensed photographs or real document imagery. No example images ship in this package. Supply your own material and retain the permission or attribution record. The crop is a centered 340 × 155 window; choose an image that remains meaningful in that framing.

Each edition requires `label` (22 characters), `note` (38 characters), and a `kind`: `booklet`, `lesson`, `exhibit`, `checklist`, or `broadcast`. Select symbols to match the intended medium. Strings are escaped; missing images and invalid counts fail before project generation.

## Create and render

Use Node.js 22 or newer, npm, a working Chromium installation and FFmpeg. Install the pinned dependencies, retaining their license files:

```sh
npm ci --ignore-scripts
node scripts/compose.mjs --brief /absolute/brief.json --out /absolute/project
./node_modules/.bin/hyperframes inspect /absolute/project --json
./node_modules/.bin/hyperframes render /absolute/project --output /absolute/film.mp4 --fps 30 --quality high --strict --workers 1
```

Set `PUPPETEER_EXECUTABLE_PATH` to an existing Chromium executable if automatic discovery is unavailable. Installation omits lifecycle scripts; the tested path uses existing Chromium and the prebuilt platform dependencies.

The generated HTML, copied images, brief, license record and GSAP clock remain editable. HyperFrames consumes the registered timeline. Time is evaluated directly so reverse seeking does not depend on prior playback. Fonts and their licenses are bundled. GSAP comes from the pinned npm dependency and its notice is copied into each project.

## Read the movement

The document entrances begin at 0.22 seconds. The complete chain contracts between 1.92 and 2.56 seconds. Branches start at 2.79 seconds with a 0.18-second stagger. Outputs arrive only after their route approaches its endpoint. The last output is readable before 4.3 seconds; the remainder is a reading hold. The diagram has no soundtrack or audio editor.

Inspect the actual encoded movie at normal speed, all label bounds, image crops, connector endpoints and native transition frames. Check forward and backward seeks. Use short labels: the contracted header deliberately reduces document detail, while output labels remain large. Test changed counts and Chinese text before delivery. A successful render does not replace visual review.
