by adom
AI-driven studio for finishing demo videos: review every captured clip, flag and re-record the weak ones, speed up dead air, narrate, mux and auto-level, validate the final cut, and publish straight to the wiki, driven end to end by your AI.
← Commit history
skill cleanup (source only, not yet released): retired adom-desktop/gallia replaced (adom-bridge, pup_* verbs verified live), shorter valid descriptions; the embedded root SKILL.md needs a binary rebuild to ship.
5 files changed
+59−75
SKILL.md+14−18@@ -1,14 +1,10 @@ --- name: video-post-description: >- Post-production for demo recordings: speed up boring parts with overlay- captions, add voiceover narration after the fact, or publish the final video- to a wiki page. For pre-production and recording (writing demo scripts,- setting up panels, driving the recording), use the demo-recording skill- instead. Trigger words: speed up demo recording, speed up video, timelapse- video, fast forward boring parts, compress slow parts of video, video- post-production, voiceover after recording, narrate a recording, demo- speedup, demo post-process, post-process demo, publish demo video to wiki.+description: >-+ Post-production for demo recordings: speed up boring parts with overlay captions, add voiceover+ after the fact, publish the final video to a wiki page. For recording itself use demo-recording.+ Use when asked to speed up a demo recording, timelapse a video, narrate a recording, or publish a+ demo. --- # video-post@@ -83,7 +79,7 @@ ffprobe -v error -show_streams ~/project/recordings/final.webm | grep codec_type ## 🗣️ TTS pronunciation — consult the `tts-pronunciation` skill, not a table here -`edge-tts` and other neural engines mispronounce many Adom tool names and acronyms (`adom-tsci` → "adom-sci", `JLCPCB` → garbled, `UART` → "yoo-art", etc.). The canonical pronunciation table lives in the **`tts-pronunciation` skill** at `gallia/skills/tts-pronunciation/SKILL.md` (data file: `pronunciations.json`). **Always consult that skill when drafting or validating narration** — do not maintain a parallel table in this skill.+`edge-tts` and other neural engines mispronounce many Adom tool names and acronyms (`adom-tsci` → "adom-sci", `JLCPCB` → garbled, `UART` → "yoo-art", etc.). The canonical pronunciation table lives in the **`tts-pronunciation` skill** at `~/.claude/skills/tts-pronunciation/SKILL.md` (data file: `pronunciations.json`). **Always consult that skill when drafting or validating narration** — do not maintain a parallel table in this skill. **Rule:** before muxing a clip, every Adom-ish proper noun in its narration text must match the `narration` column of an entry in `pronunciations.json`. If a term isn't in the table, stop and add it (contribution flow documented in that skill). @@ -243,7 +239,7 @@ video-post health video-post mark init # Wrap any slow command with a speedup marker-video-post wrap --speed 20 --label "Exporting gerbers" -- adom-desktop fusion_export_gerbers+video-post wrap --speed 20 --label "Exporting gerbers" -- adom-bridge fusion_export_gerbers video-post wrap --speed 15 --label "Pulling source files" -- pull_and_analyze "C:/tmp/foo.fbrd" # OR drop manual start/end markers@@ -300,14 +296,14 @@ Drops a `speedup_start` event (with speed multiplier and caption label) and a ma ### `wrap` ```bash-video-post wrap --speed 20 --label "Exporting gerbers" -- adom-desktop fusion_export_gerbers+video-post wrap --speed 20 --label "Exporting gerbers" -- adom-bridge fusion_export_gerbers ``` Convenience wrapper that drops a start marker, runs the command, drops the end marker, and returns the command's exit code. Equivalent to: ```bash video-post mark start --speed 20 --label "Exporting gerbers"-adom-desktop fusion_export_gerbers+adom-bridge fusion_export_gerbers RC=$? video-post mark end exit $RC@@ -430,7 +426,7 @@ Features: ```bash video-post publish \ --input /home/adom/project/recordings/demo-fast-narrated.webm \- --page apps/adom-desktop \+ --page adom/fusion-bridge \ --caption "Fusion 360 deep dive: BQ25792 manufacturing pipeline" ``` @@ -465,7 +461,7 @@ video-post voiceover --input demo-fast.webm # → demo-fast-narrated.webm # 4. Publish to wiki (Phase 3)-video-post publish --input demo-fast-narrated.webm --page apps/adom-desktop \+video-post publish --input demo-fast-narrated.webm --page adom/fusion-bridge \ --caption "Fusion 360 deep dive" ``` @@ -485,9 +481,9 @@ JSONL, one event per line. Self-contained — the file embeds the recording star Default file path: `$VIDEO_SPEEDUP_MARKERS` env var, or `/tmp/video-post-markers.jsonl` if unset. -## Integration with adom-desktop demo flow+## Integration with a scripted demo flow -`adom-desktop`'s `scripts/demo-record.sh` integrates with this tool:+The retired `adom-desktop` repo's `scripts/demo-record.sh` (legacy) showed the pattern any demo script can follow: - `demo-record.sh start` calls `video-post mark init` after the Hydrogen recording starts - `demo-record.sh stop` calls `video-post process` automatically if any speedup markers exist, producing both `demo.webm` and `demo-fast.webm`@@ -497,7 +493,7 @@ Per-step demo commands wrap their slow operations: ```bash step_caption "Step 7/12: Exporting gerbers" video-post wrap --speed 20 --label "Exporting gerbers" -- bash -c '- GERBER_RESP=$(adom-desktop fusion_export_gerbers 2>&1)+ GERBER_RESP=$(adom-bridge fusion_export_gerbers 2>&1) pull_and_analyze "$ZIP_PATH" ' fusion_grid "Step 7" /tmp/step-7.png
install.sh+1−1@@ -1,5 +1,5 @@ #!/bin/bash-# adompkg install hook for adom-video-post. Places the prebuilt binary and+# adom-wiki pkg install hook for adom-video-post. Places the prebuilt binary and # deploys the embedded SKILL.md via the binary's own `install` subcommand. set -e HERE="$(cd "$(dirname "$0")" && pwd)"
skills/demo-recording/SKILL.md+10−15@@ -1,14 +1,9 @@ --- name: demo-recording-description: >- Use when the user wants to record a demo, make a video, create a walkthrough,- record their screen, or capture a demo of a feature. Handles the full- pre-production and recording workflow: writing the demo script, generating- captions, verifying the setup, choreographing panels, and driving the- recording. Hands off to adom-video-post for post-production (speedup, voiceover,- publish). Trigger words: record a video, record a demo, make a movie, create- a walkthrough, record my screen, demo video, screen recording, narrate a- walkthrough, capture a demo, make a demo.+description: >-+ Pre-production and recording of demo videos: the demo script, captions, setup checks, panel+ choreography, driving the recording; hands off to adom-video-post. Use when asked to record a+ demo, make a demo video, create a walkthrough, record my screen, or capture a demo. --- # Demo Recording — orchestration@@ -19,7 +14,7 @@ sub-docs you should follow when their phase becomes relevant: | Sub-doc | When to load it | |---|---|-| [recording-mechanics.md](recording-mechanics.md) | Before you touch `recording start` / `browser_record_start`. Covers Hydrogen vs pup, foreground-rebump, page-side repaint, and the **NEVER stitch screenshots** rule. |+| [recording-mechanics.md](recording-mechanics.md) | Before you touch `recording start` / `pup_record_start`. Covers Hydrogen vs pup, foreground-rebump, page-side repaint, and the **NEVER stitch screenshots** rule. | | [script-and-tts.md](script-and-tts.md) | Before you record the first clip. Script template, narration phonetics, captions, panel choreography, voiceover draft. | | [per-snippet-flow.md](per-snippet-flow.md) | While you record + after. Setup verification, the record loop, manifest add, **storyboard review (mandatory)**, concat, hero, wiki upload, workspace restore. | @@ -229,13 +224,13 @@ conversations. The user is the only continuity. Why it happens: it's "obvious" you'll remember next time. You won't — your memory ends with the conversation. -Why it is wrong: skill files in gallia load on every Claude Code+Why it is wrong: installed skill files load on every Claude Code session. Memory is local. Lessons that apply to "demos in general" belong in the skill file, not in chat. Fix: if the user gives you feedback that applies to FUTURE demo sessions, the conversation isn't done until you've written the-lesson into the skill file and committed it to gallia.+lesson into the skill file and pushed it to the skill's wiki page repo. ### 9. Tolerating a slow capture mechanism instead of fixing the page @@ -248,7 +243,7 @@ isn't repainting" is invisible. Why it is wrong: documented in the "NEVER stitch screenshots" rule in [recording-mechanics.md](recording-mechanics.md). The capture-mechanism (`browser_record_start`) is fine. The page-side fix+mechanism (`pup_record_start`) is fine. The page-side fix (continuous setInterval pump that mutates camera + `scene.render()`; strip ArcRotateCamera input handlers) is the answer. @@ -321,7 +316,7 @@ that matches the phase you're in, not all three at once. ## Recorded-tab verification BEFORE recording starts -Always `pup browser_screenshot` the target tab and visually confirm it before calling `recording start`. The `active-tab` selector can silently miss (off-screen tab, multi-window setup, recently-closed tab repurposed). A bad active-tab selection can cost an entire 30+ scene demo to re-record.+Always `pup_screenshot` the target tab and visually confirm it before calling `recording start`. The `active-tab` selector can silently miss (off-screen tab, multi-window setup, recently-closed tab repurposed). A bad active-tab selection can cost an entire 30+ scene demo to re-record. ## Board fills the recording frame @@ -332,7 +327,7 @@ For a PCB-centric demo, never zoom so far that the board looks tiny in the frame These are the specific framings and setup tweaks that the user has confirmed across multiple demos: - **Maximize the Fusion window** before any Fusion-side recording — partial windows look amateurish-- **Use `browser_focus_window` for pup**, NOT `desktop_bring_to_front`. The latter is jarring and disrupts the user; the former just brings the pup window forward without animating+- **Use `pup_focus_window` for pup**, NOT `desktop_bring_to_front`. The latter is jarring and disrupts the user; the former just brings the pup window forward without animating - **Revoke approvals in ALL demo setups** — old "always allow" approvals get bypassed during the recording and the demo looks like the user already trusted everything (which the demo is supposed to be showing as a fresh setup) - **Never run demos as background bash scripts** — they need foreground control so the recorder can pause/resume cleanly
skills/demo-recording/recording-mechanics.md+30−30@@ -2,7 +2,7 @@ This is the **capture-mechanism reference** for demo recordings. Cross-cuts both Hydrogen and pup paths. Read this before touching-`recording start` / `browser_record_start` for the first time in a+`recording start` / `pup_record_start` for the first time in a session. Everything that's catastrophic-if-skipped is in the first half of the file. @@ -10,18 +10,18 @@ half of the file. > "What a real demo means" sections in the parent are preconditions > to this file. If you haven't read them, stop and go back. -## 🚨 NEVER stitch `browser_screenshot` calls into a video+## 🚨 NEVER stitch `pup_screenshot` calls into a video **The capture mechanism for ALL pup-recorded video demos is-`adom-desktop browser_record_start` / `browser_record_stop` — full-stop.** Do not write a recorder that polls `browser_screenshot` in a-loop and ffmpeg-stitches PNGs into a webm. `browser_screenshot` is a+`adom-bridge pup_record_start` / `pup_record_stop` — full+stop.** Do not write a recorder that polls `pup_screenshot` in a+loop and ffmpeg-stitches PNGs into a webm. `pup_screenshot` is a ~770 ms-per-call one-shot devtools capture; even 4-way concurrent it caps around 3 fps, and the resulting "video" plays as a slideshow. Users cannot diagnose this — they just see "the demo looks horrific" and the conversation gets uglier from there. -**Diagnostic:** if your `browser_record_start` recording came out+**Diagnostic:** if your `pup_record_start` recording came out "frozen" (CDP screencast deduplicates identical pixel frames), the problem is **the page didn't repaint**, NOT the capture mechanism. Fixes go on the page side, not the recorder side:@@ -31,7 +31,7 @@ Fixes go on the page side, not the recorder side: 3. Strip ArcRotateCamera input handlers (`cam.inputs.removeByType('pointers'|'mousewheel'|'keyboard')`) before mutating alpha — they recompute camera state from inertia every frame and clobber direct writes. 4. UI events (hover, ctxmenu, isolate, inspector) stack ON TOP of the always-painting canvas — they never replace it. -`browser_record_start` reliably captures **20–30 fps real footage**+`pup_record_start` reliably captures **20–30 fps real footage** when the page is actually painting. That's 10–20× the rate of screenshot-stitching, and the resulting webm scrubs / plays smooth. @@ -48,8 +48,8 @@ ffmpeg -y -i raw.webm -c:v libvpx-vp9 -b:v 1.5M -pass 1 -an -f null /dev/null ffmpeg -i raw.webm -c:v libvpx-vp9 -b:v 1.5M -pass 2 -c:a libopus out.webm ``` -If you find yourself reaching for `browser_screenshot` polling-because `browser_record_start` "doesn't work," **stop and re-read this+If you find yourself reaching for `pup_screenshot` polling+because `pup_record_start` "doesn't work," **stop and re-read this section.** The capture is fine; the page isn't painting. ## 🚨 Wiki webm: keyframes every 1 s — NEVER upload raw recordings@@ -122,13 +122,13 @@ surfaces never compete. | Surface | When | Capture mechanism | Caption tooling | Notes | |---|---|---|---|---| | **Hydrogen** | Default. Demoing a Hydrogen-hosted feature. | `adom-cli hydrogen recording start --reason ...` → MediaRecorder on the workspace iframe. | `adom-cli hydrogen caption show "<text>"` overlays cleanly. | Best resolution + cleanest output. Don't use if another tab in the same workspace is occupying webviews you'd want to recapture later. |-| **pup** | "Aci is using webviews", "don't touch my Hydrogen layout", "the tool I'm demoing has its own UI in a Chrome tab anyway." | `adom-desktop browser_open_window` + `browser_focus_window` + `browser_record_start` (CDP screencast on the pup tab). | No `caption show` — render the caption inside the page itself with a temporary `<div>` injected via `browser_eval`, OR rely entirely on TTS narration. | Frame rate is paint-throttled by Chrome unless the window is OS-foregrounded — see "🔥 The pup foreground-rebump trick" below. Tar pulls of large recordings may exceed the 60-second WebSocket timeout — pull frames in batches of ~40 if `pull_file` returns null. |+| **pup** | "Aci is using webviews", "don't touch my Hydrogen layout", "the tool I'm demoing has its own UI in a Chrome tab anyway." | `adom-bridge pup_open_window` + `pup_focus_window` + `pup_record_start` (CDP screencast on the pup tab). | No `caption show` — render the caption inside the page itself with a temporary `<div>` injected via `pup_eval`, OR rely entirely on TTS narration. | Frame rate is paint-throttled by Chrome unless the window is OS-foregrounded — see "🔥 The pup foreground-rebump trick" below. Tar pulls of large recordings may exceed the 60-second WebSocket timeout — pull frames in batches of ~40 if `pull_file` returns null. | ### Third surface — the NATIVE browser (only for logged-in demos) When a demo needs the user's **real session / cookies / logins** (a tool gated behind their account), neither Hydrogen nor pup will do — those are throwaway/managed browsers with **no logins**. Only the user's real Chrome-has them. Record it through the **adom-browser-extension** (`nbrowser_record_start {method:"wgc"|"getdisplaymedia"}`).+has them. Record it through the **native browser extension** (nb-bridge) (`nbrowser_record_start {method:"wgc"|"getdisplaymedia"}`). **The canonical example is `chip-fetcher`.** It fetches each part's CAD by signing into the engineer's **stored vendor accounts** — Mouser, DigiKey, SnapEDA/SnapMagic, ComponentSearchEngine, TI, etc. A pup or Hydrogen browser@@ -147,27 +147,27 @@ Hydrogen or pup. Chrome **paint-throttles** any tab whose window is not the OS foreground. CDP `Page.startScreencast` only emits a frame when the page repaints, so a backgrounded pup tab silently drops to ~5 fps even when you asked for 15 fps. Symptoms: 275 captured frames in 46 s of wall-clock = ~6 fps real, video plays back ~3× faster than reality, narration desyncs from action. -**The trick:** `browser_focus_window` calls Win32 `SetForegroundWindow` to raise the pup window to the OS foreground. Calling it ONCE before `browser_record_start` is not enough — anything that grabs OS focus during the recording (Hydrogen tab switch, a notification, the user clicking elsewhere) re-throttles the pup tab. The fix is to **re-bump foreground before every action**, not just at the start.+**The trick:** `pup_focus_window` calls Win32 `SetForegroundWindow` to raise the pup window to the OS foreground. Calling it ONCE before `pup_record_start` is not enough — anything that grabs OS focus during the recording (Hydrogen tab switch, a notification, the user clicking elsewhere) re-throttles the pup tab. The fix is to **re-bump foreground before every action**, not just at the start. ```bash SESS="demo-snippet" # Open + initial focus-adom-desktop browser_open_window "$(jq -nc --arg s "$SESS" --arg u "$URL" \+adom-bridge pup_open_window "$(jq -nc --arg s "$SESS" --arg u "$URL" \ '{sessionId:$s, profile:$s, url:$u}')" sleep 4-adom-desktop browser_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')"+adom-bridge pup_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')" sleep 1 # Re-bump RIGHT BEFORE record_start — this is the critical one-adom-desktop browser_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')"-RID=$(adom-desktop browser_record_start "$(jq -nc --arg s "$SESS" \+adom-bridge pup_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')"+RID=$(adom-bridge pup_record_start "$(jq -nc --arg s "$SESS" \ '{sessionId:$s, fps:15, quality:75}')" | jq -r '.recordingId') # Wrap every action so foreground gets re-bumped before each one focused_eval() {- adom-desktop browser_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')" >/dev/null- adom-desktop browser_eval "$(jq -nc --arg s "$SESS" --arg e "$1" \+ adom-bridge pup_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')" >/dev/null+ adom-bridge pup_eval "$(jq -nc --arg s "$SESS" --arg e "$1" \ '{sessionId:$s, expr:$e}')" >/dev/null } @@ -175,7 +175,7 @@ focused_eval 'document.getElementById("btn-foo").click()' sleep 3 # short sleeps are fine — focus persists across them focused_eval 'document.getElementById("btn-bar").click()' sleep 3-adom-desktop browser_record_stop "$(jq -nc --arg s "$SESS" --arg r "$RID" \+adom-bridge pup_record_stop "$(jq -nc --arg s "$SESS" --arg r "$RID" \ '{sessionId:$s, recordingId:$r}')" ``` @@ -183,7 +183,7 @@ adom-desktop browser_record_stop "$(jq -nc --arg s "$SESS" --arg r "$RID" \ ```bash # After every recording, check this BEFORE you commit to mux + TTS:-STOP=$(adom-desktop browser_record_stop ...)+STOP=$(adom-bridge pup_record_stop ...) FRAMES=$(echo "$STOP" | jq -r '.frameCount') DUR_MS=$(echo "$STOP" | jq -r '.durationMs') ACTUAL_FPS=$(python3 -c "print(${FRAMES}/(${DUR_MS}/1000))")@@ -191,7 +191,7 @@ echo "captured ${ACTUAL_FPS} fps (asked for 15)" # Below 12 fps → the window dropped foreground at some point. Re-record with the rebump pattern, don't try to mask with playback speedup. ``` -**Don't substitute `browser_alert_window`** — it flashes the taskbar but explicitly does NOT steal foreground (so Chrome stays paint-throttled). Don't substitute `desktop_bring_to_front` either — it works but per the project memory ("use browser_focus_window for pup, not desktop_bring_to_front"), the browser-typed call is the canonical one.+**Don't substitute `pup_alert_window`** — it flashes the taskbar but explicitly does NOT steal foreground (so Chrome stays paint-throttled). Don't substitute `desktop_bring_to_front` either — it works but per the project memory ("use pup_focus_window for pup, not desktop_bring_to_front"), the browser-typed call is the canonical one. **Side-effect to know about:** because `SetForegroundWindow` is OS-level, the user briefly sees the pup window raise to front during recording. Tell them in advance ("you'll see a Chrome window pop forward for ~30 s") so they don't think your code is fighting their workspace. @@ -212,7 +212,7 @@ Two fixes, pick one: This keeps the compositor running, which keeps frames flowing through CDP. Cost: a barely-visible animated dot. Benefit: full requested frame rate during static sections. -2. **Force micro-motion via `browser_eval`** between actions when you can't add CSS to the target page. Inject a 1-pixel scroll back-and-forth every 200 ms, or update a CSS variable that affects a transform:+2. **Force micro-motion via `pup_eval`** between actions when you can't add CSS to the target page. Inject a 1-pixel scroll back-and-forth every 200 ms, or update a CSS variable that affects a transform: ```bash # Background loop nudging the page during the recording@@ -240,25 +240,25 @@ URL="https://<container>.adom.cloud/proxy/$PORT/" # the proxied URL of the too # Per section: SESS="demo-$ID"-adom-desktop browser_open_window "$(jq -nc --arg s "$SESS" --arg u "$URL" \+adom-bridge pup_open_window "$(jq -nc --arg s "$SESS" --arg u "$URL" \ '{sessionId:$s, profile:$s, url:$u}')" sleep 4-adom-desktop browser_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')"+adom-bridge pup_focus_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')" sleep 1 -RID=$(adom-desktop browser_record_start "$(jq -nc --arg s "$SESS" \+RID=$(adom-bridge pup_record_start "$(jq -nc --arg s "$SESS" \ '{sessionId:$s, fps:15, quality:75}')" | jq -r '.recordingId') -# ... drive the section via browser_eval calls ...-adom-desktop browser_eval "$(jq -nc --arg s "$SESS" --arg e "<JS>" \+# ... drive the section via pup_eval calls ...+adom-bridge pup_eval "$(jq -nc --arg s "$SESS" --arg e "<JS>" \ '{sessionId:$s, expr:$e}')" -STOP=$(adom-desktop browser_record_stop "$(jq -nc --arg s "$SESS" --arg r "$RID" \+STOP=$(adom-bridge pup_record_stop "$(jq -nc --arg s "$SESS" --arg r "$RID" \ '{sessionId:$s, recordingId:$r}')") TAR=$(echo "$STOP" | jq -r '.tarPath') -adom-desktop pull_file "$(jq -nc --arg t "$TAR" '{filePaths:[$t], saveTo:"/tmp/demo/tar"}')"-adom-desktop browser_close_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')"+adom-bridge pull_file "$(jq -nc --arg t "$TAR" '{filePaths:[$t], saveTo:"/tmp/demo/tar"}')"+adom-bridge pup_close_window "$(jq -nc --arg s "$SESS" '{sessionId:$s}')" # Mux the CDP frames → webm EXTRACT=/tmp/demo/tar/${ID}-extract && mkdir -p "$EXTRACT"
skills/gang-takes/SKILL.md+4−11@@ -1,16 +1,9 @@ --- name: gang-takes-description: >- Cut several screen-recording takes to their action and gang them into one- narrated video: real time by default, the idle seconds before, between and- after the action removed by change detection, the real duration of the work- stated on screen, narration written and fitted to the measured length of the- cut, text overlays in the Adom brand fonts on a soft glow, no cards, no- letterbox. Use for "combine these clips into one video", "gang up the- recordings", "only show the action", "cut the boring parts", "narrate to the- length of the video", "captions over the screen recording", "one video from- the three takes", "brand fonts on video captions", "captions file for the wiki video",- "chapters for the video", "adom-video widget".+description: >-+ Cut several screen-recording takes to their action and gang them into one narrated video: idle+ time removed, real durations stated, narration fitted to the cut, brand-font overlays. Use when+ asked to combine clips into one video, only show the action, or cut the boring parts. --- # gang-takes: one narrated video from several takes, action only