---
name: document-condense
description: Turn two detailed document images into a compact side-by-side comparison with a short landscape result, using an editable GSAP timeline and HyperFrames rendering.
version: 1.0.3
---

# Document Condense

Create an 8.4-second, 1920×1080 comparison: one portrait document appears, a second joins, both move and shrink as one group, then a landscape digest opens on the right. Two large captions arrive after the group settles. The final composition holds for more than three seconds.

This is a parameterized document renderer. It does not summarize factual material automatically. An author must write and verify the digest and supply the document rasters or author them with the optional page tool.

## Prepare

Use Node.js 22 or newer, FFmpeg, and a local Chromium browser. Run `npm ci` in this directory. Dependencies are pinned in the lockfile. Font files and their licenses are included. GSAP is installed from npm and its license is retained in generated projects. For the optional page authoring tool, set `CHROME_PATH` or pass `--browser` when your browser is outside the default macOS location.

Read [the input guide](references/inputs.md) and [the production guide](references/production.md). For new topics, begin with the authoring checklist in [editorial guide](references/editorial.md).

## Generate

Save a JSON brief as described in the input guide, then run:

```sh
node scripts/compose.mjs --brief /absolute/input.json --out /absolute/new-project --theme porcelain
```

Choose `porcelain`, `deep-sea`, `rose-clay`, or `graphite`. Themes affect the stage and captions; document photographs keep their own colors. The output directory must be empty. The generator copies only the three supplied raster files and the runtime resources into a portable, editable project.

The command prints the HyperFrames render invocation. Use `--workers 1` for bounded rendering. Open `index.html` through a local HTTP server to inspect the scene; the paused GSAP timeline is exposed as `window.__timelines['document-condense']`. `window.seekDocument(seconds)` supports deterministic review from any direction, including zero.

## Optional document authoring

Write two substantive articles, each with a rights-cleared photograph and four paragraphs, plus three concise steps. `node scripts/pages.mjs --brief /absolute/editorial.json --out /absolute/new-materials` writes editable HTML materials, PNG rasters, `input.json`, and overflow checks. Pass that `input.json` into the composition tool. These are authored editorial documents, not extracted records or proof of scientific findings. Do not invent measured claims.

## Verify delivery

Inspect entry, second-page appearance, contraction, digest wipe, captions, and the settled state. Check native frames and play the encoded film at 1×. Keep two portrait sheets and one landscape result, without cropping their content. Do not interpret the smaller displayed footprint as a numerical reduction in the underlying facts. Captions remain editable; text inside input rasters is edited in the material source and rerasterized.

The renderer creates no sound. If the brief needs audio, use licensed audio in a separate editable timeline, mix it into the encoded deliverable, probe the final streams, and listen before claiming sound acceptance. Image rights, factual accuracy, and final visual acceptance are the author's responsibility.
