-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(previews): isolate chapter renders and export layout bounds #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9df879e
1312518
b27cd4f
70e6aa1
f4bf4b4
2aca4bb
54199c0
4f8ab2d
b48e603
8eb96e9
d376201
3e5ecc5
decab15
0ab716b
4919783
8502d15
010fb8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,87 @@ | ||||||||||||||
| # video-use repository context | ||||||||||||||
|
|
||||||||||||||
| video-use is a public, conversation-driven video production framework. Changes | ||||||||||||||
| made here may be packaged into the skill and reused by people with different | ||||||||||||||
| machines, media, workflows, providers, brands, and output goals. Treat the | ||||||||||||||
| repository as a general product, never as one person's customized clone. | ||||||||||||||
|
|
||||||||||||||
| ## Product principles | ||||||||||||||
|
|
||||||||||||||
| - The delivered video is the product. Prioritize visual and audio quality, | ||||||||||||||
| editorial judgment, factual correctness, synchronization, pacing, and | ||||||||||||||
| production reliability. | ||||||||||||||
| - Design reusable contracts and capabilities. Do not hardcode personal paths, | ||||||||||||||
| credentials, account ids, prompts, brands, preferences, or assumptions | ||||||||||||||
| about one project. | ||||||||||||||
| - Keep provider-specific behavior behind narrow boundaries. Core EDL validation, | ||||||||||||||
| rendering, reframing, and QC must remain usable from the command line without | ||||||||||||||
| any optional client or remote runner. | ||||||||||||||
| - Preserve backwards compatibility when practical. If a format must change, | ||||||||||||||
| provide a clear migration path and reject unsupported input with an actionable | ||||||||||||||
| error. | ||||||||||||||
| - Never silently downgrade a requested feature. A missing source, track, model, | ||||||||||||||
| codec, or dependency should fail before expensive work begins and explain what | ||||||||||||||
| is required. | ||||||||||||||
| - Defaults should be safe and broadly useful, while explicit project or user | ||||||||||||||
| requirements always win. | ||||||||||||||
| - Keep credentials out of source, logs, fixtures, prompts, and generated | ||||||||||||||
| artifacts. Configuration belongs in environment variables or provider secret | ||||||||||||||
| stores. | ||||||||||||||
|
|
||||||||||||||
| ## Architecture boundaries | ||||||||||||||
|
|
||||||||||||||
| - `SKILL.md` defines the agent workflow and public editing contract. | ||||||||||||||
| - `helpers/` contains provider-independent production tools and validation. | ||||||||||||||
| - `skills/` contains focused companion skills and reusable production assets. | ||||||||||||||
| - `tests/` protects public behavior. Optional clients or remote runners may | ||||||||||||||
| orchestrate core features but must never become the only place a feature | ||||||||||||||
| exists. | ||||||||||||||
|
|
||||||||||||||
| Keep decision data explicit in portable project files such as `edit/edl.json`. | ||||||||||||||
| Renderers should consume declared inputs deterministically. UI state, agent | ||||||||||||||
| history, and cloud runtime state must not be required to reproduce an output. | ||||||||||||||
|
|
||||||||||||||
| ## Change workflow | ||||||||||||||
|
|
||||||||||||||
| 1. Identify whether a change belongs to the public editing contract, a reusable | ||||||||||||||
| helper, a focused skill, or an optional adapter. | ||||||||||||||
| 2. Implement the smallest complete general capability at the lowest reusable | ||||||||||||||
| layer. Wire adapters to that capability instead of duplicating it. | ||||||||||||||
| 3. Validate inputs locally before uploads or paid compute. Validate again at | ||||||||||||||
| remote execution boundaries. | ||||||||||||||
| 4. Add tests for successful use, invalid input, backwards compatibility, and | ||||||||||||||
| provider-boundary behavior where relevant. | ||||||||||||||
| 5. For render changes, create representative media and inspect the encoded | ||||||||||||||
| dimensions, duration, frame rate, visual framing, and audible output. | ||||||||||||||
| 6. Update the public EDL example or usage documentation whenever users or agents | ||||||||||||||
| need to author a new field. | ||||||||||||||
|
|
||||||||||||||
| Cost and latency are secondary unless the user sets a budget or deadline. Improve | ||||||||||||||
| them only when output quality and reliability remain equal or improve. | ||||||||||||||
|
|
||||||||||||||
| ## Communication and commits | ||||||||||||||
|
|
||||||||||||||
| After code changes, summarize the affected files, the functions or contracts | ||||||||||||||
| added, and what each does in plain language. Keep this technical context compact | ||||||||||||||
| so someone can learn an unfamiliar codebase without reading every diff. | ||||||||||||||
|
|
||||||||||||||
| Write simple, readable commit messages. Prefer short lowercase wording without | ||||||||||||||
| punctuation. | ||||||||||||||
|
|
||||||||||||||
| ## Branch discipline | ||||||||||||||
|
|
||||||||||||||
| Several agents work on this repository at once. To keep one agent's progress | ||||||||||||||
| from being overwritten by another: | ||||||||||||||
|
|
||||||||||||||
| - One feature per branch, one agent per branch. Never edit a worktree that | ||||||||||||||
| belongs to another branch; take files from a commit or tag instead. | ||||||||||||||
| - Commit early. Uncommitted work in a worktree has no merge base and no | ||||||||||||||
| history, so a later sync silently discards it. | ||||||||||||||
| - Hard rules in `SKILL.md` are append-only. New rules get the next number. | ||||||||||||||
| Removing or renumbering a rule requires an explicit reason in the commit. | ||||||||||||||
| - Procedure prose belongs in `references/<feature>.md` at the repository root; | ||||||||||||||
| create that folder with the first reference file. Edits to `SKILL.md` | ||||||||||||||
| are limited to rules, helper-index bullets, directory-tree lines, the EDL | ||||||||||||||
| example, and one-line pointers to the reference files. | ||||||||||||||
|
Comment on lines
+82
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This repository-wide rule sends companion-skill documentation to the wrong directory. Keep root-skill procedures in Prompt for AI agents
Suggested change
|
||||||||||||||
| - `tests/test_skill_contract.py` checks that the rules and every referenced | ||||||||||||||
| path still exist. Run it before committing a `SKILL.md` change. | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ Try video-use in [Browser Use Cloud](https://cloud.browser-use.com/v4?utm_campai | |
| - **Burns subtitles** in your style — 2-word UPPERCASE chunks by default, fully customizable | ||
| - **Generates animation overlays** via [HyperFrames](https://github.com/heygen-com/hyperframes), [Remotion](https://www.remotion.dev/), [Manim](https://www.manim.community/), or PIL — spawned in parallel sub-agents, one per animation | ||
| - **Self-evaluates the rendered output** at every cut boundary before showing you anything | ||
| - **Builds original narrated explainers from a topic** — semantic Manim teaching assets, chapter previews, generated narration with word-timed captions | ||
| - **Persists session memory** in `project.md` so next week's session picks up where you left off | ||
|
|
||
| ## Setup prompt | ||
|
|
@@ -66,6 +67,9 @@ brew install yt-dlp # optional, for downloading online sources | |
| # 3. Add your ElevenLabs API key | ||
| cp .env.example .env | ||
| $EDITOR .env # ELEVENLABS_API_KEY=... | ||
|
|
||
| # 4. Optional: Manim for original explainers built from a topic | ||
| uv sync --extra animations | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Following this optional setup does not install or check LaTeX, a hard prerequisite for the documented Manim explainer workflow. Add the platform-specific LaTeX prerequisite or point users to the Manim setup instructions before claiming the feature is set up. Prompt for AI agents</file context> |
||
| ``` | ||
|
|
||
| ## How it works | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -207,6 +207,17 @@ Pick the engine per animation slot. Do not default to Remotion just because the | |||||||||||||||||||||||
| - **Manim** — formal diagrams, state machines, equation derivations, graph morphs. Read `skills/manim-video/SKILL.md` and its references for depth. | ||||||||||||||||||||||||
| - **PIL + PNG sequence + ffmpeg** — simple overlay cards: counters, typewriter text, single bar reveals, progressive draws. Fast to iterate, any aesthetic you want. The launch video used this. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| For an original end-to-end explainer, complete `edit/visual_plan.md`, use one | ||||||||||||||||||||||||
| independently renderable Manim class per narrative chapter with named internal | ||||||||||||||||||||||||
| beats, and build persistent semantic objects from | ||||||||||||||||||||||||
| `skills/manim-video/assets/teaching.py` and `skills/manim-video/assets/domains/`. | ||||||||||||||||||||||||
| Narration is part of this deliverable by default unless the user explicitly | ||||||||||||||||||||||||
| requests silence. Teach one mechanism per explainer under a minute, keep chapters to | ||||||||||||||||||||||||
| three, never time stretch recorded narration to fit, and keep labels at font size 24 | ||||||||||||||||||||||||
| or larger; the full contract is in `skills/manim-video/references/concept-explainer.md`. This requirement does not apply to clip editing or an isolated | ||||||||||||||||||||||||
| illustration overlay. Read `skills/manim-video/references/concept-explainer.md` | ||||||||||||||||||||||||
| before authoring a Manim scene. | ||||||||||||||||||||||||
|
Comment on lines
+210
to
+219
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This adds procedure prose to Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| For HyperFrames slots, scaffold the slot inside `edit/animations/slot_<id>/` with `npx --yes hyperframes init . --example blank --non-interactive --skip-skills`, build the HTML composition there, run the HyperFrames checks that fit the slot (`lint`, `validate`, and a draft render when practical), then produce the final overlay video with `npx --yes hyperframes render . -o render.mp4` or `--format webm -o render.webm` when alpha is required. Point the EDL overlay `file` at the actual rendered path. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| For Remotion slots, keep the Remotion project isolated inside the same slot directory, scaffold with `npx create-video@latest` or install Remotion locally there, render the composition to `render.mp4` with the project-local `remotion render` command, and verify duration and dimensions with `ffprobe`. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The provider-independent
helpers/contract contradicts the existing ElevenLabs-specific transcription helpers. Either move provider integrations behind an explicit adapter boundary or narrow this statement so contributors do not place or assume provider-specific code is provider-independent.Prompt for AI agents