From d1e20c42737761a758affc508818751bc0e93ddd Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Fri, 22 May 2026 10:10:30 +0000 Subject: [PATCH] docs: add hero demo video playback workflow --- README.md | 2 + dogfood/agent-uses-agent-tty/README.md | 2 + .../agent-uses-agent-tty/VIDEO_PLAYBACK.md | 66 ++++ dogfood/agent-uses-agent-tty/manifest.json | 10 +- mise.lock | 2 +- mise.toml | 34 +- src/tools/canonicalBundleArtifacts.ts | 72 ++++ src/tools/hero-demo.ts | 67 +--- src/tools/hero-video-playback.ts | 312 ++++++++++++++++++ 9 files changed, 508 insertions(+), 59 deletions(-) create mode 100644 dogfood/agent-uses-agent-tty/VIDEO_PLAYBACK.md create mode 100644 src/tools/canonicalBundleArtifacts.ts create mode 100644 src/tools/hero-video-playback.ts diff --git a/README.md b/README.md index b190f54..e29dd96 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ This dogfood bundle uses VHS as the outer camera for real Codex and Claude inter | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | [![Codex agent-tty demo](./dogfood/agent-uses-agent-tty/artifacts/codex-thumbnail.png)](./dogfood/agent-uses-agent-tty/artifacts/codex-outer.webm) | [![Claude agent-tty demo](./dogfood/agent-uses-agent-tty/artifacts/claude-thumbnail.png)](./dogfood/agent-uses-agent-tty/artifacts/claude-outer.webm) | +GitHub may show these checked-in WebM proof files as raw downloads. See [`VIDEO_PLAYBACK.md`](./dogfood/agent-uses-agent-tty/VIDEO_PLAYBACK.md) for the upload-ready H.264 MP4 flow that turns the thumbnails into GitHub video-player links. + See [`dogfood/agent-uses-agent-tty/`](./dogfood/agent-uses-agent-tty/) for the Hero Demo reproducer, outer transcripts, inner Neovim recordings, and final file proofs. ## Common Usage diff --git a/dogfood/agent-uses-agent-tty/README.md b/dogfood/agent-uses-agent-tty/README.md index 243d4df..dd0799f 100644 --- a/dogfood/agent-uses-agent-tty/README.md +++ b/dogfood/agent-uses-agent-tty/README.md @@ -3,6 +3,8 @@ This bundle is the README-facing **Hero Demo** for real coding-agent TUIs using `agent-tty`. VHS records the outer Codex and Claude Code TUIs as the presentation layer. The product proof is the inner `agent-tty` artifact set produced while each real agent explores the skill and CLI, drives Neovim, and exports recordings. +GitHub may show checked-in WebM files as raw downloads; see [VIDEO_PLAYBACK.md](./VIDEO_PLAYBACK.md) for the H.264 attachment flow used to turn these thumbnails into GitHub video-player links. + | Agent | Outer Hero Demo | Inner proof artifacts | File proof | | ------ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------ | | Codex | [![Codex Hero Demo](./artifacts/codex-thumbnail.png)](./artifacts/codex-outer.webm) | [cast](./artifacts/codex-inner-nvim.cast), [WebM](./artifacts/codex-inner-nvim.webm) | [proof](./artifacts/codex-final-file-proof.txt) | diff --git a/dogfood/agent-uses-agent-tty/VIDEO_PLAYBACK.md b/dogfood/agent-uses-agent-tty/VIDEO_PLAYBACK.md new file mode 100644 index 0000000..86ad234 --- /dev/null +++ b/dogfood/agent-uses-agent-tty/VIDEO_PLAYBACK.md @@ -0,0 +1,66 @@ +# Hero Demo GitHub video playback + +GitHub repository file pages may show checked-in video files as raw downloads instead of a player. The canonical Hero Demo recordings stay checked in as WebM proof artifacts, but README-facing playback should use GitHub-uploaded H.264 MP4 attachment URLs. + +## Current recommendation + +1. Keep these checked-in proof artifacts as the source of truth: + - `artifacts/codex-outer.webm` + - `artifacts/claude-outer.webm` +2. Generate upload-only H.264 MP4 copies from those WebMs. +3. Upload the MP4 copies through GitHub's Markdown attachment flow. +4. Replace the README thumbnail link targets with the resulting `https://github.com/user-attachments/assets/...` URLs. + +The MP4 copies are derived playback assets, not canonical proof artifacts. They should live under `.debug/video-upload/` locally unless the project later chooses a Pages gallery or another committed-media route. + +## Prepare upload assets + +From the repository root: + +```bash +mise run demo:agent-uses-agent-tty:upload-assets +``` + +The task uses the pinned `ffmpeg`/`ffprobe` from `mise.toml`, converts both outer WebMs to H.264 MP4 files, writes ffprobe metadata, and writes checksums under `.debug/video-upload/`. + +Expected constraints for the promoted 2026-05-21 recordings: + +| Agent | Upload file | Expected codec | Expected dimensions | Expected size | +| ------ | ------------------------------------------- | ----------------- | ------------------- | ------------- | +| Codex | `.debug/video-upload/codex-outer-h264.mp4` | H.264 / `yuv420p` | 1600x900 | ~3.3 MB | +| Claude | `.debug/video-upload/claude-outer-h264.mp4` | H.264 / `yuv420p` | 1600x900 | ~3.0 MB | + +Both expected sizes are below GitHub's 10 MB video attachment limit for free plans. + +## Upload through GitHub + +GitHub does not expose a supported PAT-backed API for creating `user-attachments` video URLs. Use the web Markdown editor flow: + +1. Open any GitHub Markdown text area with write access to `coder/agent-tty`: + - a draft issue body, + - a PR comment, + - or the web editor for a Markdown file. +2. Drag `codex-outer-h264.mp4` into the text area and wait for GitHub to replace it with a `https://github.com/user-attachments/assets/...` URL. +3. Drag `claude-outer-h264.mp4` into the text area and copy its URL too. +4. The comment or draft does not need to be submitted if the URLs have been copied. +5. Verify each copied URL opens a GitHub video player before editing the README. + +## README patch after upload + +Apply the copied attachment URLs with the helper task: + +```bash +mise run demo:agent-uses-agent-tty:apply-video-urls -- \ + --codex-url https://github.com/user-attachments/assets/REPLACE-CODEX-H264-MP4 \ + --claude-url https://github.com/user-attachments/assets/REPLACE-CLAUDE-H264-MP4 +``` + +The task updates the root README, the bundle README, and the bundle manifest entry for `README.md`. Verify the result with: + +```bash +npm run validate-bundle:canonical +``` + +## Fallback + +If GitHub attachment URLs are rejected for maintainability, use a GitHub Pages gallery with `