When generating or regenerating demo MP4s for user review, always create and open an HTML viewer rather than opening individual files.
Pattern:
- Generate all MP4s
- Write
output/example-suite/review.html— a dark-themed grid with<video controls muted loop playsinline>cards - Serve it via
output/example-suite/serve.mjsover HTTP (notfile://) so videos load and seek correctly - Open
http://localhost:5555in the browser
Why HTTP not file://: Browsers enforce Accept-Ranges / byte-range requests for video seeking and some block file:// video entirely. A minimal Node HTTP server with range support (already in serve.mjs) fixes this.
HTML viewer conventions:
- Dark background (
#0d0f14), cards with native<video>player controls IntersectionObserverautoplay — videos play when scrolled into view, pause when out- Filter bar by category (new / autosync / redaction / core)
- Colour-coded tags: green=new, blue=autosync, purple=redaction
- Grid:
repeat(auto-fill, minmax(560px, 1fr))
Serve script: node output/example-suite/serve.mjs
Opens at http://localhost:5555
- Never bypass hooks — no
--no-verify - Pre-commit: prettier, eslint, cspell
- Pre-push: vitest, coverage, knip, dep-check
src/editor/must NOT import fromsrc/playback/— usesrc/capture/types.ts
- vitest — run with
pnpm test - 1044 tests across 96 files
- Mock
../../src/playback/visuals.jsinline withvi.mock()factory (no hoisted variables)
- New step actions → entry in
src/playback/actions.tsactionHandlers map - Step schemas →
src/spec/step-schema.ts - Public API exports →
src/index.ts - Assert steps produce zero visual effects — no
pulseFocus, noflashSpotlight
This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work- Use
bdfor ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists - Run
bd primefor detailed command reference and session close protocol - Use
bd rememberfor persistent knowledge — do NOT use MEMORY.md files
When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
- File issues for remaining work - Create issues for anything that needs follow-up
- Run quality gates (if code changed) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY:
git pull --rebase bd dolt push git push git status # MUST show "up to date with origin" - Clean up - Clear stashes, prune remote branches
- Verify - All changes committed AND pushed
- Hand off - Provide context for next session
CRITICAL RULES:
- Work is NOT complete until
git pushsucceeds - NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds