--- name: building-the-review-page description: Build or change the standalone review page (scripts/_review.py, `npx ffmpeg-skill review`) — the editor-style screen where a person looks at a render project and its result and composes an instruction for their agent. Covers the fixed constraints (one offline HTML file, nothing executed, no new dependency, not a contract tool), the 16:10 three-column layout, the numbering scheme every element carries (S, C, T, A, M, R, P, #), the instruction composer, options read from the contract, playback and waveforms, the interface checklist, and how to verify a change in a real browser. Use when adding a panel, a control or a field to the review page, when changing its HTML/CSS/JS, or when reviewing such a change. --- # Building the Review Page The review page is for a person who knows Premiere or DaVinci and directs an agent. It shows what was planned and what was measured, and it turns clicks into an instruction the agent can act on. It is not an editor: nothing on it changes media. ## Constraints that do not move - **One HTML file, offline.** No network request, no CDN, no web font. Images, the output video and stills are local files beside the page. - **The page runs nothing.** It writes text (an instruction, an edited project JSON). Rendering again is `render.py`, started by the person or their agent. - **No new dependency.** Plain HTML, CSS and JavaScript. No framework, no build step. Third-party editor kits (Remotion, Editframe and the like) are out for this reason. - **Standalone only (#633).** Not a contract tool, not listed by the MCP server. - **Shipped Python is under a ceiling** (`.github/code-budget.json`). The page's markup, CSS and JS are `scripts/_review.html`; `_review.py` only measures and puts one JSON document where the template says `/*DATA*/`. A new thing the page shows is derived in the template's script from that document; Python changes only when something new must be measured. - **The page measures nothing.** A row is green only where the run's own `ok` is true or `check.py` said PASS. A missing value reads "not measured". - **Every write is guarded.** The page, each still and the marker go through `write_new()` and `is_input()` in `_review.py`: staged beside the target, replaced by name, refused when the target is an input by name or by file identity. A new output file uses the same two calls. ## Layout: one 16:10 screen, three columns No page scroll at 1440×900 or 1920×1080. A panel with more rows than fit scrolls inside itself. | Column | Top | Bottom | | --- | --- | --- | | Left | Sources: one card per file, with its probe facts | Work steps: each tool that ran, in order | | Centre | Viewer: Source / Program / side by side, safe-area overlay, transport | Timeline: ruler, V, T, A tracks with the waveform, markers, ranges, playhead, zoom | | Right | Inspector: the selected item's values and its options; measured against target; what a person must confirm | Instruction composer, always visible | The header carries the project, the output, the PASS and to-check counts, the language switch and Save project. Under it, one strip holds every measured row: to-check first, then what a person must confirm, then the passes. Below 1440×860 the whole screen is scaled to fit; it never stacks into a phone layout, because it is a tool for a computer. Not built yet (do not describe them as present): a loudness meter, a switch between this run and the one before, a proxy for a file the browser cannot play. ## Every element has a number A person points at things by number; the agent reads the same numbers. | Prefix | Is | | --- | --- | | `S1` | a source file | | `C1` | a clip on the video track | | `T1` | a caption cue | | `A1` | an audio track | | `M1` | a marker: a position to look at (from `check.py`, or set by the person) | | `R1` | a range the person marked with In and Out | | `P1` | a measured property against its target | | `#1` | a work step: one tool run, in execution order | Numbers are stable within one page build. A work step shows the tool, what it did in one line, and the measured before and after (`372.4 s → 60.0 s`), taken from that step's result document, never recomputed by the page. ## The instruction composer - Clicking any numbered element selects it and adds a row for it. - Each row has one free-text field: what should change. - Choosing an option in the inspector, or editing a caption's text there, writes the row's text itself. - The page assembles one instruction: the project file, one line per row (`- C2 (clip 2): out to 05:28.0`), and the legend of prefixes. Copy puts it on the clipboard. The text stays visible, so it can be copied by hand. ## Options come from the contract The choices offered for a work step are that tool's real flags, read from `python3 scripts/_contract.py --json`: never a hand-kept list. The default shown is the contract's. An option appears in the instruction only once the person sets it. A flag the tool does not have is not offered. ## Playback and waveforms - **The waveform** is one image of the output's sound (`showwavespic`), written into the stills folder through the same guarded call as a still. - **After a render**, the output plays in a `