Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- **Workflows.** Save a routine you want repeated, such as a podcast clean-up
or the weekly reel, as steps in plain words plus the tool calls that did
them. An agent lists your workflows and follows one on the next project,
fitting each step to the new footage instead of replaying it blindly. Saved
in `library/workflows/` and shared by every project; agents use
`fablecut_workflows`, and `/api/workflows` serves them over REST.

### Changed
- **Dropdowns match the editor.** The editor's dropdowns open a list in its
dark theme instead of the browser's own popup, with optgroup headings, the
Expand Down
58 changes: 57 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Every Claude Code session then has these tools:
always the open one. See "Projects" below.
- `fablecut_versions` — a project's saved versions: save one before big edits, compare
a version with now, restore one (never destructive), mark the final cut. See "Versions" below.
- `fablecut_workflows` — saved workflows: recipes of steps (and the tool calls that did
them) the user wants repeated on other projects. Save one, list them, show one and follow
it. See "Workflows" below.

### Token-efficient editing (important for agents)

Expand Down Expand Up @@ -219,8 +222,9 @@ Reusable assets, visible in the editor's left-panel tabs and never copied:
| `library/fonts/` | font editor | `.ttf/.otf/.woff/.woff2`, auto-registered, family name = file name; a variable font draws every `weight` |
| `library/presets/` | Inspector → Motion → Presets | saved animation presets, one `.json` each (see "Presets and templates") |
| `library/templates/`| **Templates** | saved templates, one `.json` each, listed after the built-in ones |
| `library/workflows/`| — | saved workflows, one `.json` each (see "Workflows") |

- List via `GET /api/library?dir=sfx|elements|svg|fonts|presets|templates` (recursive; subfolders OK).
- List via `GET /api/library?dir=sfx|elements|svg|fonts|presets|templates|workflows` (recursive; subfolders OK).
- To use one in the timeline, add a media entry whose `src` is its library path,
e.g. `{ "id":"m_x", "name":"whoosh.mp3", "kind":"audio", "src":"/library/sfx/whoosh.mp3" }`
— then reference it from clips like any other media.
Expand Down Expand Up @@ -1892,6 +1896,55 @@ and restore if the user prefers the old one; **client rounds** — save "Round 1
"Round 2", … with the feedback in the note, mark the approved one final;
**what did the agent do?** — `diff` against the "Before agent edits" version.

### Workflows

A **workflow** is a recipe the user wants repeated on other projects: "my podcast
clean-up", "the weekly reel", "client delivery". It is a name, what it is for, and
its steps in order. Each step says in plain words what to do, and may carry the
tool call that did it last time. Workflows are shared by every project, one JSON
file each in `library/workflows/<id>.json`:

```jsonc
{ "id": "podcast-clean-up", "name": "Podcast clean-up",
"description": "Voice level, no dead air, captions, a Shorts cut.", "tags": ["podcast"],
"steps": [
{ "text": "Reduce the room noise on the voice clips.",
"call": { "tool": "fablecut_denoise", "args": { "clipIds": ["c_vo"], "amount": "medium" } } },
{ "text": "Normalize the voice to -16 LUFS.",
"call": { "tool": "fablecut_normalize_audio", "args": { "clipIds": ["c_vo"], "target": -16 } } },
{ "text": "Cut the pauses longer than half a second, keeping the music bed running." },
{ "text": "Export for YouTube Shorts.", "call": { "tool": "fablecut_export", "args": { "preset": "youtube-shorts" } } } ],
"created": "…", "updated": "…" }
```

| key | does |
|---|---|
| `name` · `id` | up to 80 characters; the id is made from the name, and saving the same name again updates that workflow (it keeps its `created`) |
| `description` · `tags` | what it is for (up to 600 characters) · up to 12 labels |
| `steps` | 1–50, each `{text, call?}` (a plain string is a step with only text); `text` up to 1000 characters |
| `call` | `{tool, args}`: a FableCut tool (not `fablecut_workflows`) and the arguments it was given, up to 20 000 characters |

**Following one is a job for judgement, not a replay.** The new project has other
clips, ids and times, so a step's call is a worked example: read what the step says,
look at the project (`fablecut_get_project {compact:true}`, `fablecut_frame`), and
make the call that does that here. A step with no call is one only the agent's
judgement can do ("pick the three strongest shots").

**Agents** use `fablecut_workflows` (or the REST endpoints below):

- `{}` lists them (id, name, steps, tags, description); `{action:"show", id}` gives
the steps to follow (id or name).
- `{action:"save", workflow:{name, description?, tags?, steps}}` keeps one. Save when
the user asks to keep or repeat what was just done: write each step the way you would
explain it to another editor, and attach the calls that worked. A call to a tool that
doesn't exist refuses the save.
- `{action:"delete", id}` removes one: only when the user asks.

Recipes: **"do what you did last week"** — `{}`, then `show` the one that matches and do
its steps; **a house style for every episode** — after the first episode is right, save
its loudness, captions, grade and export steps as one workflow; **hand a routine to another
agent** — the file in `library/workflows/` is plain JSON any agent can read.

### Sequences

A project can hold several **sequences**: timelines of their own that share
Expand Down Expand Up @@ -2261,6 +2314,9 @@ obvious cuts were missed, raise it if motion is being misread as cuts.
- `GET /api/presets` · `GET /api/templates` — the saved presets / templates, validated (bad files skipped);
`POST /api/presets {preset}` · `POST /api/templates {template}` — validate one and save it as
`library/presets/<id>.json` / `library/templates/<id>.json`, returning `{id, name, file}`
- `GET /api/workflows[?id=]` — the saved workflows, validated (bad files skipped), or one by id or name (404 if none) ·
`POST /api/workflows {workflow}` — validate and save it as `library/workflows/<id>.json`, returning it with
`created` / `updated` · `POST /api/workflows/delete {id}` → `{deleted}`. See "Workflows".
- `POST /api/upload?name=foo.mp4` — raw body saved into ./media, returns `{src}`.
MP4/MOV/M4V uploads are auto-remuxed with `+faststart` (needs ffmpeg on PATH).
Files copied straight into ./media by external tools skip this — remux big ones
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ big operation (cutting silences, snapping to the beat, reframing), and every
- **Projects** — a dashboard of every project with pictures, notes and tags: open, create from a canvas or a saved project template, duplicate, rename, archive and delete, import an old project file; media is shared, so copies cost no footage
- **Sequences** — several timelines in one project (a 16:9 and a 9:16 cut, cut-downs, alternatives) sharing its media and compositions, each with its own canvas, frame rate, mix and delivery settings; switch from the menu at the left of the timeline toolbar
- **Versions** — non-destructive history: save a version (Ctrl/Cmd+S), automatic versions every 10 minutes and before an agent edits, compare a version with now, restore (the current state is kept as a version first), mark the final cut; backups carry every version, and an unreadable `project.json` is recovered at startup
- **Workflows** — save a routine you want repeated (a podcast clean-up, the weekly reel) as plain-language steps plus the tool calls that did them, in `library/workflows/`; an agent lists them and follows one on the next project, fitting each step to the new footage (`fablecut_workflows`)
- **Proxies** — light, frame-accurate H.264 copies of 4K / HEVC / ProRes footage made in the background (ffmpeg); edit on the proxy with the monitor's **Proxy** button, export always renders the originals
- **Import from URL** — **+ URL** downloads an HTTPS video/audio/image into
`./media/` (same-origin after import). Remote SVG is refused. Agents use
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/audio/index.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/docs/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ const PAGES = [
lede: "Saved copies of a project you can compare and go back to, made by you, every few minutes, and before an agent edits; restoring is never destructive, and a backup carries them all.",
parts: [["project.json schema", "Versions"]],
},
{
slug: "workflows", nav: "Workflows", title: "Workflows", group: "The timeline",
lede: "Save a routine you want repeated — steps in plain words plus the tool calls that did them — and have an agent follow it on the next project.",
parts: [["project.json schema", "Workflows"]],
},
{
slug: "sequences", nav: "Sequences", title: "Sequences", group: "The timeline",
lede: "Several timelines in one project — a 16:9 and a 9:16 cut, cut-downs, alternatives — sharing its media and compositions, each with its own canvas, mix and delivery settings.",
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/captions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@
<div class="wrap docs" id="main">
<nav class="docs-side" aria-label="Docs">
<button class="docs-menu" type="button" aria-expanded="false" aria-controls="docsNav"><svg class="i" aria-hidden="true"><use href="#i-menu"/></svg><span>Captions</span></button>
<div class="docs-nav" id="docsNav"><details class="docs-sec" data-group="Start"><summary class="docs-group">Start</summary><div class="docs-sec-links"><a href="../">Overview</a><a href="../studio/">Studio (no install)</a><a href="../mcp/">MCP tools</a></div></details><details class="docs-sec" data-group="The timeline"><summary class="docs-group">The timeline</summary><div class="docs-sec-links"><a href="../project-json/">project.json</a><a href="../props/">Clip props</a><a href="../compositions/">Compositions</a><a href="../media/">Media management</a><a href="../projects/">Projects</a><a href="../versions/">Versions</a><a href="../sequences/">Sequences</a><a href="../editing/">Editing rules</a><a href="../library/">Asset library</a></div></details><details class="docs-sec" data-group="Picture and sound" open><summary class="docs-group">Picture and sound</summary><div class="docs-sec-links"><a href="../audio/">Audio mix</a><a href="../transcripts/">Transcripts</a><a href="../captions/" aria-current="page">Captions</a><a href="../color/">Color</a><a href="../masks/">Masks</a><a href="../compositing/">Track mattes and blending</a></div></details><details class="docs-sec" data-group="Motion"><summary class="docs-group">Motion</summary><div class="docs-sec-links"><a href="../tracking/">Tracking</a><a href="../motion/">Shapes and parenting</a><a href="../motion-paths/">Motion paths</a><a href="../presets-templates/">Presets &amp; templates</a></div></details><details class="docs-sec" data-group="Guides"><summary class="docs-group">Guides</summary><div class="docs-sec-links"><a href="../recipes/">Recipes</a><a href="../remake/">Remake a reference</a><a href="../frames/">Look at the footage</a></div></details><details class="docs-sec" data-group="Reference"><summary class="docs-group">Reference</summary><div class="docs-sec-links"><a href="../rest-api/">REST API</a><a href="../export/">Export</a></div></details></div>
<div class="docs-nav" id="docsNav"><details class="docs-sec" data-group="Start"><summary class="docs-group">Start</summary><div class="docs-sec-links"><a href="../">Overview</a><a href="../studio/">Studio (no install)</a><a href="../mcp/">MCP tools</a></div></details><details class="docs-sec" data-group="The timeline"><summary class="docs-group">The timeline</summary><div class="docs-sec-links"><a href="../project-json/">project.json</a><a href="../props/">Clip props</a><a href="../compositions/">Compositions</a><a href="../media/">Media management</a><a href="../projects/">Projects</a><a href="../versions/">Versions</a><a href="../workflows/">Workflows</a><a href="../sequences/">Sequences</a><a href="../editing/">Editing rules</a><a href="../library/">Asset library</a></div></details><details class="docs-sec" data-group="Picture and sound" open><summary class="docs-group">Picture and sound</summary><div class="docs-sec-links"><a href="../audio/">Audio mix</a><a href="../transcripts/">Transcripts</a><a href="../captions/" aria-current="page">Captions</a><a href="../color/">Color</a><a href="../masks/">Masks</a><a href="../compositing/">Track mattes and blending</a></div></details><details class="docs-sec" data-group="Motion"><summary class="docs-group">Motion</summary><div class="docs-sec-links"><a href="../tracking/">Tracking</a><a href="../motion/">Shapes and parenting</a><a href="../motion-paths/">Motion paths</a><a href="../presets-templates/">Presets &amp; templates</a></div></details><details class="docs-sec" data-group="Guides"><summary class="docs-group">Guides</summary><div class="docs-sec-links"><a href="../recipes/">Recipes</a><a href="../remake/">Remake a reference</a><a href="../frames/">Look at the footage</a></div></details><details class="docs-sec" data-group="Reference"><summary class="docs-group">Reference</summary><div class="docs-sec-links"><a href="../rest-api/">REST API</a><a href="../export/">Export</a></div></details></div>
</nav>
<article class="docs-main prose">
<h1>Captions</h1>
<p class="docs-lede">Captions timed word by word from the transcript, in four styles, burned into the picture; SRT and WebVTT out and in.</p>
<p>Captions are made from a transcript (see <a href="../transcripts/">Transcripts and text-based editing</a>): the timeline's words are grouped into captions, and each caption is an ordinary <strong>text clip</strong> with <code class="ic">wordTimes</code> (each word's start and end), so its animation follows the speech word by word, and <code class="ic">caption: true</code>, so captions can be found, replaced and exported as a group. Because they are text clips they render the same way in preview and export (burned into the picture), and the Inspector restyles them like any title.</p><div class="tbl"><table><thead><tr><th>style</th><th>look</th></tr></thead><tbody><tr><td><code class="ic">subtitle</code> (default)</td><td>plain text on a dark bar, low on the frame, up to two lines</td></tr><tr><td><code class="ic">karaoke</code></td><td>bold outlined text; each word lights up as it is said</td></tr><tr><td><code class="ic">highlight</code></td><td>big uppercase outlined words, the one being said in a colour (<code class="ic">highlightColor</code>) - the short-video look; up to five words</td></tr><tr><td><code class="ic">pop</code></td><td>one to three big words at a time, each popping in as it is said</td></tr></tbody></table></div><p>A new caption starts at a pause of 0.6 s or more, after a sentence, after a comma once it has three words, or when it would run too long (lines, words or seconds). Lines are as long as fit the canvas at the style's size: sizes follow the canvas's shorter side, so a 9:16 reel gets narrower captions than a 16:9 video. Each caption stays about a quarter of a second after its last word, never into the next one, and starts and ends on whole frames.</p><p>They go on the video lane captions are already on; otherwise on the top video lane when nothing is there while they run, else on a new lane above it. Making captions again <strong>replaces</strong> the ones there. Make them <strong>after the cutting is done</strong>: a cut through a caption shortens it but doesn't re-time its words, so make them again after you change the edit. The editor says so for a moment whenever an edit shortens a caption.</p><p>In the editor, the <strong>Captions</strong> row of the <strong>Transcript</strong> tab: pick a style, then <strong>Add captions</strong> (one undo step). <strong>SRT</strong> and <strong>VTT</strong> download the timeline's captions as a subtitle file; <strong>Import…</strong> places the captions of an SRT or WebVTT file instead, re-broken to the style's line length, with their words spread over each caption. Select a caption to restyle it in the Inspector: the <strong>Highlight</strong> colour sits under <strong>Animation</strong>, and a note says its words follow the speech.</p><p><strong>Agents</strong> use <code class="ic">fablecut_captions</code>:</p><ul><li><code class="ic">{}</code> or <code class="ic">{style:"highlight"}</code> makes captions from every clip with sound (transcribing what has no transcript yet, as <code class="ic">fablecut_transcribe</code> does), and answers with where they went and the first few. <code class="ic">clipIds</code>, <code class="ic">from</code> / <code class="ic">to</code> limit it; <code class="ic">lines</code>, <code class="ic">words</code> and <code class="ic">size</code> (a scale on the style's size) adjust it; <code class="ic">track</code> picks the lane; <code class="ic">replace:false</code> keeps the captions already there.</li><li><code class="ic">{export:"srt"}</code> or <code class="ic">{export:"vtt"}</code> writes the captions that show (not disabled, not on a disabled track) to <code class="ic">exports/&lt;project name&gt;.srt</code> or <code class="ic">.vtt</code>, adding a number when that name is taken (<code class="ic">&lt;project name&gt; 2.srt</code>), and returns the path: use that one.</li><li><code class="ic">{import:"&lt;path to .srt or .vtt&gt;"}</code> places a file's captions (the file's text works too).</li><li><code class="ic">{remove:true}</code> deletes every caption clip. Locked captions are left alone and refuse the call unless <code class="ic">force:true</code>.</li><li>Check one with <code class="ic">fablecut_frame {time}</code> while a word is being said. Restyle them all with <code class="ic">updateClip</code> (e.g. <code class="ic">props:{highlightColor:"#22d3ee", y:500}</code>) on each caption id from the compact view, which lists a caption as <code class="ic">[5 words timed to speech]</code> instead of its times.</li></ul>
<div class="docs-end">
<a class="more" href="https://github.com/ronak-create/FableCut/blob/main/CLAUDE.md#L769" rel="noopener" target="_blank">Edit this in CLAUDE.md <svg class="i i-ne" aria-hidden="true"><use href="#i-ne"/></svg></a>
<a class="more" href="https://github.com/ronak-create/FableCut/blob/main/CLAUDE.md#L773" rel="noopener" target="_blank">Edit this in CLAUDE.md <svg class="i i-ne" aria-hidden="true"><use href="#i-ne"/></svg></a>
<a class="more" href="https://raw.githubusercontent.com/ronak-create/FableCut/main/CLAUDE.md" rel="noopener" target="_blank">The whole manual as Markdown <svg class="i i-ne" aria-hidden="true"><use href="#i-ne"/></svg></a>
</div>
<nav class="docs-pn" aria-label="Previous and next page"><a class="docs-pn-prev" href="../transcripts/"><span>Previous</span><b>Transcripts</b></a><a class="docs-pn-next" href="../color/"><span>Next</span><b>Color</b></a></nav>
Expand Down
Loading
Loading