by RodGrc · built while making Haiku
A starter for teaching an AI coding agent to edit video. Picture and sound become timed evidence. The edit is React. The judgment lives in files the agent can open one page at a time.
This repository is the empty studio. It does not contain finished videos, personal notes, or a sound library.
Editing is not only cutting. Someone looks, listens, and decides what is worth telling. An agent has four gaps for that job:
| Gap | What goes wrong | What this repo does about it |
|---|---|---|
| Video | The model sees sampled stills, not motion. A 60 s clip at 30 fps is 1,800 frames; sending 1 per second skips 29 of every 30. | sureshot picks frames by events (cuts, motion, text) and keeps a timeline. |
| Audio | The model gets, at best, a transcript. | sureshot adds speech with timestamps, silences and signal events. |
| Editing environment | Editors are made for hands and eyes. | The edit is a Remotion (React) project: every cut is a line you can review. |
| Context | Your brand and rules do not fit in one prompt. | AGENTS.md, PROJECT.md and a wiki/ with an index, read page by page. |
| Piece | Path | Role |
|---|---|---|
| Editor | this folder | Remotion project, one folder per video |
| Perception | .agents/skills/sureshot/ |
Speech, on-screen text, cuts, motion, silence in one timeline |
| Remotion rules | .agents/skills/remotion-best-practices/ |
How to write a composition |
| Judgment | wiki/ |
Index plus the pages that apply to the job |
| Sounds | assets/audio/ |
Shelves and a catalog shape. No audio files yet |
| Manual | AGENTS.md |
How the agent should work in any project |
ingest -> understand -> decide -> produce -> verify
ffmpeg sureshot agent Remotion sureshot + you
(+ Gemini) + wiki + FFmpegWhatever fails in verify goes back to decide. A render with no error can still have bad cuts, drifting audio or empty stretches.
- Node.js 18 or newer
- Windows, with Python 3.10 to 3.13 for sureshot and the sound scripts
sureshot installs the rest (ffmpeg, speech, OCR, Gemini key) with a guided command that asks before each step:
python .agents/skills/sureshot/scripts/sureshot.py setup --plan
python .agents/skills/sureshot/scripts/sureshot.py setup
python .agents/skills/sureshot/scripts/sureshot.py doctordoctor confirms everything works. Details: .agents/skills/sureshot/INSTALL.md. OCR uses Tesseract by default; PaddleOCR is optional (setup --ocr paddle). A free Gemini key from Google AI Studio is only needed for the agent and digest commands.
The sound scripts need numpy:
python -m pip install -r scripts/requirements.txtMedia you add later (mp3, wav, mp4, png) is marked for Git LFS in .gitattributes. Install Git LFS before committing those files.
npm install
npm run devStudio opens on Example: 1080x1920, 30 fps, 150 frames.
-
Open this folder in your agent (Codex, Claude Code, Cursor). It reads
AGENTS.mdand the skills in.agents/skills/. -
Put the source video in a new project:
npm run new -- my-reel --width 1080 --height 1920 --fps 30 --frames 150
Register the snippet it prints in
src/Root.tsxand drop files in that project'sassets/. -
Ask for the job. Example prompt:
Edit a 30 s reel from
projects/<folder>/assets/source.mp4. Probe it, analyze it with sureshot, readwiki/INDEX.mdand open only the pages that apply, write the beat table and the decision inPROJECT.md, then build it in Remotion and verify sync. -
Review the render. Corrections go back to the agent as frame numbers.
python .agents/skills/sureshot/scripts/sureshot.py analyze video.mp4 --stt --ocr
python .agents/skills/sureshot/scripts/sureshot.py view video.mp4 --map
python .agents/skills/sureshot/scripts/sureshot.py inspect video.mp4 00:03-00:05
python .agents/skills/sureshot/scripts/sureshot.py report video.mp4| Command | What you get |
|---|---|
analyze |
Five layers on one clock: structure (cuts), text (OCR), motion, audio (silence, energy), speech |
view --map |
Where there is activity, without rereading everything |
inspect |
Frames only for the range you ask about |
report |
Evidence, metrics and provenance as YAML |
agent / digest |
Optional Gemini summary of the stored timeline |
sureshot does not interpret. It leaves evidence so the agent can decide and cite timestamps. Full manual: .agents/skills/sureshot/SKILL.md.
projects/<YYMMDD-name>/
PROJECT.md brief, beat table, decisions, what the edit taught
Video.tsx main composition
assets/ inputs worth keeping
_scratch/ temp and analysis frames (gitignored)
renders/ exported mp4 (gitignored)wiki/INDEX.mdlists the pages. The agent reads the index first and opens only what applies. Principles and cases are empty on purpose: add pages from the section templates as you learn.assets/audio/LIBRARY.mddescribes the sound shelves and catalog shape.scripts/prep_sfx.py,snap_cues.py,gen_placement.pyandverify_sync.pyland a sound on a frame and check the hit.
MIT. See LICENSE.