Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .claude/hooks/stage_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
After every Read, Grep, Glob or Bash call, if a new piece is in a design stage (the newest proj/*/brief.md whose
status line says Stage: interview, brief, concepts or storyboard), append one JSON line to proj/<name>/access.jsonl:
time, stage, mode, tool and the paths touched (for Bash, the command). tools/check_stage_reads.py reads the logs.
Bash commands made only of git bookkeeping (add, commit, push, status) plus cd/echo are skipped: they read no piece
content, and logging them left the log dirty after every commit. Other git commands (show, diff, log) are logged.
Any error is swallowed: the hook must never get in the way of the session.
"""
import json, os, re, sys, time, glob
Expand All @@ -28,6 +30,16 @@ def piece_in_design(root):
return best


BOOKKEEPING = re.compile(r'^(cd\b|echo\b|git\s+(add|commit|push|status)\b)')


def bookkeeping_only(cmd):
# Drop quoted text (commit messages) first, then every segment must be bookkeeping.
bare = re.sub(r'"(?:\\.|[^"\\])*"|\'[^\']*\'', '""', cmd)
segments = [s.strip() for s in re.split(r'&&|\|\||;|\||\n', bare)]
return all(not s or BOOKKEEPING.match(s) for s in segments)


def rel(root, p):
if not p:
return p
Expand All @@ -42,6 +54,8 @@ def main():
tool = ev.get('tool_name', '')
if tool not in ('Read', 'Grep', 'Glob', 'Bash'):
return
if tool == 'Bash' and bookkeeping_only(str((ev.get('tool_input') or {}).get('command', ''))):
return
found = piece_in_design(root)
if not found:
return
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Start sound for the music. Move the mouse to see the controls.
| `players/danbury-academies-clock.html` | The Academies film below with a wall clock and a session timer, for a classroom screen |
| `players/sanctioned-corporate-calm.html` | Sanctioned Corporate Calm: a 20-minute seamless study loop built from the Academies film's tunes, with a wall clock and a session timer |
| `players/gen-player.html` | The generative library below as one self-contained file (USB-stick ready) |
| `players/essay-demo.html` | The motion-essay engine in the kit (for ProofEr): shader scenes (bars from zero, a dot tally, proportional and nested areas) built from data rows, quiet transitions, words over the picture from per-language tracks (English, draft Spanish), a quiet drone, a sources chapter with links. Lays out for phones held upright too. Placeholder words and made-up numbers, labelled so. Built by `tools/build_essay_demo.py` |

- **Generative motion library:** double-click **`gen/player.html`**. Press **G** for the gallery of ready-made
cartridges (Truchet tiles, 3D dot meshes, dot swarms that fly into words, flow fields, Julia sets, tunnels,
Expand All @@ -89,6 +90,7 @@ so they run from Thonny or any editor's Run button, or from a terminal (`python3
| The **Academies film and the Sanctioned Corporate Calm study loop, with a wall clock + timer** | `tools/build_academies_clock.py` (re-run after any change to either master in `academies-film/`) | `dist/danbury-academies-clock.html`, `dist/sanctioned-corporate-calm.html` |
| A **self-contained gen player** to put on a USB stick | `python3 gen/build.py` | `gen/dist/gen-player.html` |
| **One gen cartridge as its own HTML and/or an MP4 with its music** | run `tools/gen_export.py` (pick cartridge + folder) | the folder you picked |
| The **motion essay demo** (the kit's essay engine) | `tools/build_kit.py`, then `tools/build_essay_demo.py` | `dist/essay-demo.html` |

The first build downloads the open-source fonts (SIL OFL, from Google Fonts' GitHub) and caches them; after that,
everything is offline. `tools/build.py` needs `pip install fonttools brotli`.
Expand Down Expand Up @@ -165,7 +167,7 @@ the project: the reusable parts are already here, so a new piece is mostly a sho
| `proj/<piece>/` | One piece's brief, copy and sources (`cdrom`, `pltw`, `cs`, `ex`, `ssr`, `academies`) |
| `living/`, `jukebox/` | The living-poster engine and the jukebox page |
| `engine/` | The starter timeline engine the Academies film grew from; `engine/src/audio/dsp.js` is the DSP everything uses |
| `kit/` | Engine parts packaged for other projects (the lens, the DSP), versioned, with sha256s in `kit/KIT.json`; built by `tools/build_kit.py`, never edited by hand |
| `kit/` | Engine parts packaged for other projects (the lens, the DSP, the motion-essay engine), versioned, with sha256s in `kit/KIT.json`; built by `tools/build_kit.py`, never edited by hand |
| `academies-film/` | The finished Academies hallway film |
| `fonts/` | Downloaded open-source fonts and their licenses |

Expand Down
4 changes: 2 additions & 2 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> **Visitors:** this is the project's working log, kept for the people and AI assistants working on it. For what
> EOMD is and how to use it, start with [README.md](README.md).

_Last updated: Nov 28, 2026 (kit v0.1.0: `kit/` + `tools/build_kit.py` for ProofEr; both repos are AGPLv3, so no licence obstacle; video-essay plan in `TODO.md`; lens upgraded: 6-level glow, halation, AgX/ACES, grade, dither; engine audio fallback renders in slices and works when the worker is blocked. Nov 27: optional WebGL2 lens finish, ideas taken from the Q-Day player; before that Nov 21: CD-ROM link options `?start=`, `?go`, `?airship`; before that Nov 4: fresh-eyes review added to the design stages; Academies film: clock + timer version). Each piece's history, limits and open questions live in its
_Last updated: Dec 1, 2026 (kit v0.3.0, ProofEr's addendum: portrait layouts, pause button, per-language text tracks, data-row sequences, drone bed, sources chapter; kit v0.2.0: the motion-essay engine for ProofEr: beat model + fixed-step clock, essay player shell, test hooks + `engine/tools/essay-qa.js`, plain-WebGL2 scene host + compositor with the lens on a GPU texture, 4 scenes, 6 transitions, HTML text with a WCAG check; demo at `players/essay-demo.html`. Nov 28: kit v0.1.0: `kit/` + `tools/build_kit.py` for ProofEr; both repos are AGPLv3, so no licence obstacle; video-essay plan in `TODO.md`; lens upgraded: 6-level glow, halation, AgX/ACES, grade, dither; engine audio fallback renders in slices and works when the worker is blocked. Nov 27: optional WebGL2 lens finish, ideas taken from the Q-Day player; before that Nov 21: CD-ROM link options `?start=`, `?go`, `?airship`; before that Nov 4: fresh-eyes review added to the design stages; Academies film: clock + timer version). Each piece's history, limits and open questions live in its
folder's `STATUS.md`; repo-wide history in `notes/history.md`._

## Pieces
Expand All @@ -15,7 +15,7 @@ folder's `STATUS.md`; repo-wide history in `notes/history.md`._
| CSE hallway loop (new, full creative) | Done; published Oct 25 (`players/cse-loop.html`) | ES/PT check; real-TV check | `proj/cse-loop/STATUS.md` |
| PLTW CSE promo | r2 published ("cheesy as hell, but exactly what I asked for") | The PLTW test below | `proj/pltw/STATUS.md` |
| Engine lens finish (`engine/src/fx/lens.js`) | Built Nov 27, upgraded Nov 28; in the engine's dev, kiosk, stills and MP4 paths; off by default | Not yet seen on a real TV; not yet inlined in CD-ROM, living or gen |
| Video essays (Q-Day / Last Boring Slide level) | Planned: `TODO.md`. Decided Nov 28: EOMD builds the engine as a versioned kit; ProofEr hosts motion essays (TODO §0) | Kit v0.1.0 built (`kit/`, `tools/build_kit.py`); next: ProofEr's sync script against it, then the GPU scene layer |
| Video essays (Q-Day / Last Boring Slide level) | Kit v0.3.0 (Dec 1): the essay engine (`engine/src/essay/`, `engine/src/gl/`, `engine/src/audio/bed.js`) with ProofEr's addendum for holocaust-by-country (portrait, text tracks, data-row sequences, drone bed, sources). Demo `players/essay-demo.html` (placeholder words, made-up numbers, EN + DRAFT ES track). EOMD builds the engine; ProofEr hosts motion essays (TODO §0) | ProofEr syncs 0.3.0; next here (`TODO.md` top): GPU letter type, sound hits, essay MP4. Not yet seen on a real GPU, phone or TV (tested in SwiftShader) |
| gen library (incl. Dust Type) | Working; `tools/gen_export.py` | Check Dust Type knobs | `gen/STATUS.md` |
| Jukebox | 15 cartridges | Redesign its look | `jukebox/STATUS.md` |

Expand Down
62 changes: 45 additions & 17 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ background beds, presenter tools). Take their mechanisms, never their look or mu
- Engine audio renders in slices on the main thread (`P.steps`, `P.runAsync`, `DHS.audio.renderAsync`). A blocked
worker now falls back to it instead of going silent.

**Kit v0.2.0 (Dec 1, 2026): the essay engine.** Beat model + fixed-step clock (§2), essay player shell (§5), test
hooks + `engine/tools/essay-qa.js` (§6), WebGL2 toolkit, scene host, render-to-texture compositor and lens on a GPU
texture (§1), six transitions (§1), HTML text over the picture (§3), and a demo essay with placeholder content
(`players/essay-demo.html`, built by `tools/build_essay_demo.py`). Sources: `engine/src/essay/`, `engine/src/gl/`.

**Kit v0.3.0 (Dec 1, 2026): ProofEr's addendum** for its first motion essay (holocaust-by-country, watched on
viewers' own laptops, tablets and phones): portrait layouts for every scene and text position (QA at 390×844 and
1920×1080), plays by itself with an always-visible pause button (Space), words as per-language JSON tracks with
holds per language (`engine/src/essay/track.js`), data-row scene templates and the `nested` scene, one quiet drone
bed (`engine/src/audio/bed.js`, −36 LUFS, ffmpeg-checked), a sources chapter with working links, and a takeaway.

**Next, in order** (not started):
1. **GPU letter-by-letter type** (§3).
2. **Sound hits and effects** (§4); beds that know the cut. One drone bed is done (v0.3.0).
3. **MP4 export of an essay** (§6): `tools/html_to_mp4.py` stepping the fixed clock via `EOMD_ESSAY.at(t)`, with the
bed rendered offline (`DHS.bed.steps`).
4. Adaptive quality and warm-up (§5); linked/portal transitions and scene snapshots (§1); scrambled headlines (§3).

**Dropped from the essay player (ProofEr, Dec 1):** presenter notes (N), the second window (P) and the scene grid
(O). Essays play by themselves; revisit only if a presented talk comes along.

Ordered by what unblocks the most. Each item says where it would live. "Essay player" means the player shell EOMD
builds for the kit (§0), which ProofEr uses for motion essays.

Expand All @@ -28,9 +49,9 @@ videos blur the line between interactive scrollytelling and video." Not yet: see
**v0.1.0 built Nov 28** (lens, DSP with `P.steps`/`P.runAsync`; `tools/build_kit.py`, CI check): add each part
below as it lands:
- the lens;
- the GPU toolkit, scene host and shader scene cartridges (§1);
- the GPU toolkit, scene host and shader scene cartridges (§1): **v0.2.0**;
- the DSP and sliced synthesis (`P.steps`, `P.runAsync`);
- the beat model and essay player shell (§2, §5);
- the beat model and essay player shell (§2, §5): **v0.2.0**;
- GPU type (§3) and sound hits and beds (§4).
Every file needs only the `DHS` namespace.
- [ ] **`kit/KIT.json`: the kit's manifest, agreed with ProofEr (Nov 28).** ProofEr's sync script is being written
Expand Down Expand Up @@ -76,8 +97,8 @@ videos blur the line between interactive scrollytelling and video." Not yet: see
the kit.
- **ProofEr:** anything sourced: infographics, scrolling data essays, and motion essays.
- **Test:** if a piece's claims need sources, it's ProofEr, however much it moves.
- [ ] **No three.js.** The Last Boring Slide bundles it. Rebuild everything below in plain WebGL2, as the lens is.
Confirm this rule and add it to `engine/CLAUDE.md`.
- [x] **No three.js.** The Last Boring Slide bundles it. Everything is plain WebGL2, as the lens is; the rule is in
`engine/CLAUDE.md` (Dec 1).

**Merge triggers.** Re-merge into one repo with two front doors ("motion piece", "sourced piece") sharing one method
folder and one engine when any of these happens:
Expand All @@ -89,18 +110,22 @@ Merging means keeping each front door's first-question context small (EOMD's is
tokens today).

## 1. The picture: GPU scenes and how they join
- [ ] **Shader scenes.** Each scene is one fragment shader over the whole screen:
- [x] **Shader scenes** (v0.2.0: `engine/src/gl/gl.js` preamble, `scenes.js` with field, bars, tally, areas and a
plain fallback). Each scene is one fragment shader over the whole screen:
- it gets time, a smoothed beat value, the mouse, and one or two data values;
- a shared GLSL preamble gives hash, value noise, fbm, distance-field shapes (box, capsule, torus, smooth min) and
a fake studio light for reflections;
- this is the "real object under studio light" look with no image files.
Both files do this. Lives in: `engine/src/gl/` (new), with a fallback scene when a shader won't build.
- [ ] **Render-to-texture compositor.** Draw the outgoing and incoming scenes into two buffers, run a transition
- [x] **Render-to-texture compositor** (v0.2.0: `engine/src/gl/host.js`; `DHS.lens.create(knobs, { gl })` +
`drawTexture`). Draw the outgoing and incoming scenes into two buffers, run a transition
shader between them, then the lens.
- The lens gets an entry point that takes a GPU texture, so GPU scenes skip the 2D upload and keep their full
floating-point range (AgX and halation work properly on real highlights).
- Canvas 2D scenes keep working through the upload path.
- [ ] **Transition library**, with timing as a function of transition progress:
- [ ] **Transition library**, with timing as a function of transition progress. **v0.2.0 has six** (cut, crossfade,
dip, wipe, dissolve, push; `engine/src/gl/transitions.js`), each measured at 0 or 1 flashes a second. Still to
take, as mechanisms only:
- from Q-Day: collapse (cell dissolve), ripple, tile flip, zoom-blur warp, slices. Q-Day also lists lens, glass,
liquid, cube and burn, but never wrote them;
- from The Last Boring Slide: fold, wash, flaps, slam (paper fibres), daybreak, line, tear, portal-in and
Expand All @@ -117,14 +142,14 @@ tokens today).
shaders.

## 2. Time, beats and pacing
- [ ] **Beat model.** A scene is a list of beats, each with `dur`, `delay` and `hold`.
- [x] **Beat model** (v0.2.0: `engine/src/essay/beats.js`; back runs 2.4× faster in the player). A scene is a list of beats, each with `dur`, `delay` and `hold`.
- Each beat has its own 0→1 progress that eases forward and runs back 2.4× faster when you go back.
- `s.k(beat, t0, t1, ease)` times a move inside a beat.
- It plays by itself (dur + hold, then next) or follows clicks.
Lives in: the essay player.
- [ ] **Reading-time pacing.** A beat's hold comes from its word count (Q-Day: 2.6 s + 0.31 s a word, kept between
- [x] **Reading-time pacing** (v0.2.0). A beat's hold comes from its word count (Q-Day: 2.6 s + 0.31 s a word, kept between
5.2 and 16 s). Client copy stays word for word; only the timing comes from the words.
- [ ] **A pure function of time where possible.** Both files build up progress from frame to frame. For an MP4 and a
- [x] **A pure function of time where possible** (v0.2.0: `DHS.beats.clock`, `DHS.beats.rng`). Both files build up progress from frame to frame. For an MP4 and a
seamless loop, the essay player needs a fixed-step clock (1/60 s) that seek and export can replay exactly, and a
seeded random generator in place of `Math.random`.

Expand All @@ -136,7 +161,8 @@ tokens today).
- arrival styles: rise, blur, type, fade, scatter, track, drop, by letter, word or line, with stagger;
- it can also sit inside a 3D scene.
Lives in: `engine/src/gl/type.js`; later the gen `type` layer.
- [ ] **HTML text over the picture** (Q-Day's way, for long copy and sources):
- [x] **HTML text over the picture** (Q-Day's way, for long copy and sources). v0.2.0: `engine/src/essay/text.js`, all
but the scrambled headlines:
- named positions (corners, centre, quote, chapter card, giant number);
- a soft dark patch behind the text instead of glows;
- words fading in one by one, and headlines that arrive scrambled and resolve;
Expand Down Expand Up @@ -165,15 +191,16 @@ tokens today).
Yield inside long instrument notes if it shows on a slow machine.

## 5. Player, presenter and performance
- [ ] **Essay player shell:**
- [x] **Essay player shell** (v0.2.0: `engine/src/essay/player.js`; right-click goes back; no sound yet):
- start screen with Begin with sound / Begin silently;
- controls hidden until the mouse moves, fading after 3 s (both files use less);
- progress bar with gaps between chapters;
- keyboard, swipe and right-click to go back; plays by itself (A); black screen (.); help card (?);
- `#scene-beat` links that work with the back button.
- [ ] **Presenter tools:** notes for every beat (N), notes in a second window kept in step (P), a grid of all scenes
- [ ] **Presenter tools** (dropped for essays, Dec 1: see the top of this file): notes for every beat (N), notes in a second window kept in step (P), a grid of all scenes
with thumbnails (O), and a talk timer.
- [ ] **Fill the screen without black bars:** lay out in 1920×1080 design units and widen the view to the screen's
- [x] **Fill the screen without black bars** (essays, v0.2.0/0.3.0: the GL canvas fills the screen and scenes lay out
for its shape, portrait included; the 2D runtime still letterboxes): lay out in 1920×1080 design units and widen the view to the screen's
shape (`engine/src/player/runtime.js` letterboxes today).
- [ ] **Quality that adapts.**
- Render-scale steps 1 / 0.84 / 0.70 / 0.58: drop a step after about 1.2 s of slow frames, climb back only after
Expand All @@ -183,15 +210,16 @@ tokens today).
- [ ] **Warm-up:** a loading bar that runs every scene and transition once, off-screen, before the show (no stutter
at the first cut). Scenes far from the current one shrink their buffers to 2×2 pixels; the next two scenes warm up
ahead.
- [ ] **No WebGL2:** the text and sound still play, with a plain note on screen (both files do this).
- [x] **No WebGL2:** the text and sound still play, with a plain note on screen (both files do this).

## 6. Export and QA
- [ ] **Test hooks for stepped and essay players:** `seek(scene, beat, t)`, `trans(scene, p)` and `perf(scene)`,
- [x] **Test hooks for essay players** (v0.2.0: `window.EOMD_ESSAY`, `engine/tools/essay-qa.js`; stepped players
still use `?manual` + `advance()`): `seek(scene, beat, t)`, `trans(scene, p)` and `perf(scene)`,
returning repeatable stills of any beat or any point in a transition. Used by fresh-eyes review
(`brief/CRAFT.md` §11) and by `tools/html_to_mp4.py`.
- [ ] **MP4 of an essay:** play by itself at a fixed step, capture frames, and lay in the offline render of the
event log, frame-exact. Extends `tools/html_to_mp4.py`.
- [ ] **Fresh-eyes review of transitions:** stills at 0.25, 0.5 and 0.75 of every transition, plus a flash-rate
- [x] **Fresh-eyes review of transitions** (v0.2.0: `essay-qa.js` writes the stills and measures flashes): stills at 0.25, 0.5 and 0.75 of every transition, plus a flash-rate
check.

## 7. Roll out what's already built
Expand Down
Loading
Loading