video-editing 1.3.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,181 +1,146 @@
1
- # `video-editing` CLI reference
1
+ # `video-editing` CLI reference (v2 — cloud-only)
2
2
 
3
3
  All execution goes through this CLI. Quote paths (they contain spaces).
4
4
 
5
+ **Every verb requires ClipReady credentials.** Resolution:
6
+
7
+ - **base**: `--api-base` → env `CLIPREADY_API_BASE`
8
+ - **key** (sent as `Authorization: Bearer <key>`): `--api-key` → env `CLIPREADY_API_KEY`
9
+ - **video id**: `--video-id` → `<job>/job.json` (written by `init`) → env `VIDEO_ID`
10
+
11
+ A missing base or key is a clear error → non-zero exit, nothing runs. There is
12
+ **no ElevenLabs configuration** — transcription is server-side in the ClipReady
13
+ cloud.
14
+
15
+ Most verbs support `--json` for a machine-readable result. Exit codes: `0` ok,
16
+ `1` error (incl. missing credentials), `2` validation failed, `3` ambiguous
17
+ anchor (timeline group).
18
+
5
19
  ## Pipeline commands
6
20
 
7
- - **`init-job --source <video> [--job-dir <dir>] [--force]`**
8
- Probe the source and create the job dir + `source.json`. Always pass `--job-dir`
9
- explicitly on the sandbox (e.g. `/vercel/sandbox/jobs/<job_id>`) there is no
10
- `~/Downloads` to default into. Prints the job dir.
11
-
12
- - **`transcribe (--source <video> | --job-dir <dir>) [--language <iso>] [--num-speakers <n>] [--no-heal] [--force] [--api-key <key>]`**
13
- Word-level ElevenLabs Scribe transcription (auto-heals collapsed/dropped spans)
14
- + screening artifacts: `flags.txt`, `takes_packed.md`, `word_dump.txt`, `coverage.json`.
15
- Cached per source — `--force` re-transcribes (paid). `--no-heal` disables healing.
16
-
17
- - **`cut-silences (--source|--job-dir) [--min-gap 0.30] [--target-gap 0.13] [--lead-pad 0.05] [--trail-pad 0.08] [--render preview|none] [--force-transcribe]`**
18
- Prepare a silence-only EDL-authoring prompt (`prompts/cut-silences.prompt.md`);
19
- renders a preview if `edl.json` already exists.
20
-
21
- - **`cut-bad-retakes (--source|--job-dir) [--with-sound-waves] [--quality-review] [--render preview|none] [--language] [--num-speakers] [--force-transcribe]`**
22
- Prepare the full author-edl prompt (`prompts/author-edl.prompt.md`). `--with-sound-waves`
23
- writes join QC PNGs (needs `edl.json` + `preview.mp4`). `--quality-review` writes the review prompt.
24
-
25
- - **`desilence --job-dir <dir> [--noise-db -36] [--min-silence 0.14] [--lead-pad 0.04] [--trail-pad 0.05] [--render preview|none] [--force]`** ← Gate 3
26
- Amplitude silence-trim. Runs `silencedetect=noise=<db>dB` over each EDL source, then for every
27
- keep-range **excises internal silences ≥ `--min-silence`** (leaving `lead-pad + trail-pad` of air)
28
- and **trims silent leading/trailing edges**. Catches silence the transcript can't see (dead air
29
- baked inside a stretched word token, room tone, breaths). **Transcript-aware** — never splits inside
30
- a single word token (spelled acronyms, held vowels, numbers). Backs the original EDL up to
31
- `edl.raw.json`, rewrites `edl.json`, marks it `desilenced`. Idempotent. Higher `--noise-db`
32
- (e.g. −34) + lower `--min-silence` = more aggressive.
33
- **Runs automatically at the start of every `render`** (skip with `render … --no-desilence`); the
34
- standalone command is for tuning + inspecting the result before rendering.
35
-
36
- - **`render --job-dir <dir> --mode preview|draft|final [--build-subtitles] [--no-subtitles] [--no-loudnorm] [--no-desilence]`**
37
- Render the EDL: **desilence (unless `--no-desilence`)** → per-segment extract → lossless concat →
38
- (optional subs) → loudnorm (−14 LUFS / −1 dBTP / LRA 11). preview=CRF22/1080p, draft=CRF28/720p,
39
- final=CRF20/1080p. Writes `preview.mp4`/`draft.mp4`/`final.mp4` + `cut_boundaries.json`.
40
-
41
- ## QC / verification commands
42
-
43
- - **`verify --job-dir <dir> [--full] [--window 6] [--gap 0.6] [--json] [--api-key <key>]`** ← Gate 4 (content)
44
- Re-transcribes the rendered preview with healing OFF and reports, per join,
45
- **duplicated phrases** and **over-long gaps** (dead air not tightened → warning/error).
46
- A duplicate of **≥3 words** = a retake left in → **error**. A bare **2-word** repeat = **warning**
47
- (spelled acronym / number / emphasis like "WW" → "דבל יו דבל יו" — adjudicate with `inspect`, usually safe).
48
- Default: per-join ~6s windows from `cut_boundaries.json`; `--full` re-transcribes the whole preview and
49
- also checks head/tail dead air. Writes `verify.json`; exit code 2 if `needs-fixes`.
50
-
51
- - **`inspect --job-dir <dir> (--join <i> | --start <s> --end <s>) [--video preview|vertical_src] [--transcript <path>] [-o <png>] [--n-frames 10]`**
52
- Filmstrip + waveform + word-label PNG for a window or a cut-boundary index.
53
- `timeline` is an alias. Use it to adjudicate a verify finding or pick a cut edge.
54
-
55
- ## TimelineV2 commands (`timeline.json` v2 — preferred when present)
56
-
57
- Exit codes for this group: `0` ok, `1` error, `2` validation failed, `3` ambiguous anchor.
21
+ - **`init --video <path> [--job-dir <dir>] [--master] [--force]`**
22
+ Upload the source and create the cloud job. Writes the job dir (default: a
23
+ new dir named for the clip) with `job.json` (`video_id`, api base) and
24
+ `source.json`. `--master` bakes the vertical 9:16 master locally (ffmpeg)
25
+ before upload, for non-vertical sources destined for a vertical deliverable.
58
26
 
59
- - **`timeline validate --job-dir <dir> [--json]`**
60
- Schema + semantic + capability validation of `<job>/timeline.json`. Prints errors/warnings and
61
- the capabilities the doc `uses`. Exit `2` if invalid.
27
+ - **`transcribe --job-dir <dir> [--language <iso>] [--num-speakers <n>] [--force]`**
28
+ Upload the audio; the **cloud** transcribes and screens it, then the CLI
29
+ pulls the results into the job dir: `transcripts/*.json`, `word_dump.txt`,
30
+ `takes_packed.md`, `flags.txt`, `coverage.json`, and the editorial brief
31
+ `prompts/author-edl.prompt.md` (plus any other `prompts/*.md` the server sends).
32
+ Cached server-side per source; `--force` re-transcribes.
62
33
 
63
- - **`timeline compile --job-dir <dir> [--json]`**
64
- Compile `timeline.json` → `resolved/plan.json` + `resolved/diagnostics.json` + **legacy `edl.json`**
65
- (so render/verify are unchanged). Iterate until it exits `0`. Exit `2` = validation failed,
66
- `3` = an ambiguous phrase anchor (disambiguate with `timeline resolve`). Never hand-edit `resolved/`.
34
+ ## Timeline commands (`timeline.json` v2)
35
+
36
+ - **`timeline validate --job-dir <dir> [--json]`**
37
+ Local schema + semantic + capability validation of `<job>/timeline.json`.
38
+ Exit `2` if invalid.
67
39
 
68
40
  - **`timeline resolve --job-dir <dir> --phrase <text> [--near <srcSeconds>] [--occurrence <n>] [--source <name>] [--json]`**
69
- Resolve a transcript phrase to **exact source seconds** (normalized, word-accurate match). The
70
- ONLY way to turn a phrase into an anchor time — never eyeball `word_dump.txt`. Multiple hits →
71
- exit `3` with per-occurrence context; pick one with `--near` (nearest source time) or
72
- `--occurrence` (1-based). Not found → fuzzy suggestions, exit `1`.
73
-
74
- - **`timeline captions generate --job-dir <dir> [--preset grouped|opus-karaoke] [--json]`**
75
- Enable captions in `timeline.json` (preset only cues are **derived at compile**, not hand-authored).
76
- Default preset `grouped`: up to `captions.style.maxWords` (default 4) words per cue, breaking on
77
- word gaps >0.6s, cut joins, and sentence-ending `.` `?` `!`; `opus-karaoke` is the word-by-word
78
- opt-in. Style knobs in `captions.style`: `maxWords` (4), `leadS` (0.08 — cues display that early,
79
- clamped), `holdS` (0.9 cues hold to bridge the gap to the next cue). Reports the derived cue
80
- count via a dry compile.
81
-
82
- - **`compose --job-dir <dir> [--render] [--quality draft|standard|high] [--fps 30] [--out <path>] [--proxy-crf 23] [--json]`**
83
- Build a local HyperFrames composition from `resolved/plan.json` (cut + captions/zooms/overlays)
84
- in `<job>/composition/`: `media/source.mp4` (compressed proxy of `vertical_src.mp4`, libx264
85
- CRF `--proxy-crf`, skipped when up to date), `media/audio.m4a` (the CONTINUOUS cut audio
86
- extracted from `preview.mp4`the QC preview must exist), referenced image/sticker assets
87
- copied under `media/` (preserving their job-dir-relative paths), and `index.html` (with a
88
- generated GSAP timeline when the plan uses animated vocabulary). Without `--render`,
89
- prints the composition dir + the exact `hyperframes render` command. With `--render`, runs
90
- `hyperframes render --quality <q> --fps <n> --output <out>` (default `<job>/composed.mp4`)
91
- in the composition dir — requires the `hyperframes` CLI on PATH (`npm install -g hyperframes`).
92
- `--json` prints `{compositionDir, entry, out?, segments, cues, zooms, overlays}`. This is the
93
- LOCAL delivery path for compiled captions/zooms — the ffmpeg `render` is cut-only; never use
94
- `--build-subtitles` for timeline-v2 jobs.
95
-
96
- ## Cloud thin-client commands (clipready render/QA/artifact API)
97
-
98
- Every cloud verb resolves credentials the same way and supports `--json` (machine shape;
99
- exit `0` ok, `1` error). Resolution precedence:
100
-
101
- - **base**: `--api-base` → env `CLIPREADY_API_BASE` → env `API_BASE`
102
- - **credential** (sent as `Authorization: Bearer <credential>`): `--api-key` → env `CLIPREADY_API_KEY` → env `RUN_TOKEN`
103
- - **video id**: `--video-id` → env `VIDEO_ID`
104
-
105
- A missing base / credential / (required) video id is a clear error → exit `1`.
41
+ Resolve a transcript phrase to **exact source seconds** (word-accurate).
42
+ The ONLY way to turn a phrase into an anchor time. Multiple hits → exit `3`
43
+ with per-occurrence context; pick one with `--near` or `--occurrence`
44
+ (1-based). Not found → fuzzy suggestions, exit `1`.
45
+
46
+ - **`timeline compile --job-dir <dir> [--json]`**
47
+ **Cloud compile**: uploads `timeline.json`, the server validates, resolves
48
+ anchors, derives caption cues, and returns `resolved/plan.json` +
49
+ `resolved/diagnostics.json` (written into the job dir). Iterate until exit
50
+ `0`. Exit `2` = validation failed (fix the reported `path`s), `3` =
51
+ ambiguous anchor (disambiguate with `timeline resolve`). Never hand-edit
52
+ anything under `resolved/`.
53
+
54
+ ## Preview / render commands
55
+
56
+ - **`compose --job-dir <dir> [--render] [--quality draft|standard|high] [--fps 30] [--out <path>] [--json]`**
57
+ Build the local HyperFrames composition from `resolved/plan.json` (cut +
58
+ captions/zooms/overlays) in `<job>/composition/`media proxies, referenced
59
+ assets, and `index.html`. Without `--render`, prints the composition dir +
60
+ the exact `hyperframes render` command to run. With `--render`, runs it
61
+ (requires the `hyperframes` CLI on PATH: `npm install -g hyperframes`);
62
+ default output `<job>/preview.mp4` (the render IS the preview in the cloud-first flow). This is the LOCAL delivery path.
106
63
 
107
64
  - **`cloud render --job-dir <dir> --mode preview|final [--wait] [--poll-interval 10] [--out <path>] [--json]`**
108
- Submit a render. Without `--wait`: prints `render_id` and exits `0`. With `--wait`: polls status
109
- (max 30 min) until terminal; on `completed`, downloads the signed `video_url` to `--out`
110
- (default `<job>/preview.mp4` or `<job>/final.mp4`). `failed` → exit `1` with the error. Needs a video id.
65
+ Submit a server-side render of the compiled plan. Without `--wait`: prints
66
+ `render_id` and exits `0`. With `--wait`: polls until terminal; on
67
+ `completed`, downloads the video to `--out` (default `<job>/preview.mp4` or
68
+ `<job>/final.mp4`). `failed` → exit `1` with the error.
111
69
 
112
70
  - **`cloud status <render_id> [--json]`**
113
- One status GET: `pending|running|completed|failed` (+ `video_url` when completed). `failed` → exit `1`.
114
-
115
- - **`qa frames --start <s> --end <s> [--cols <n>] [--interval <s>] [--job-dir <dir>] [--json]`**
116
- Server-render a filmstrip PNG for the window and download it to `<job>/qa/frames_<start>_<end>.png`
117
- (`./qa/` when no `--job-dir`). Prints the local path + grid metadata (Read the PNG to inspect). Needs a video id.
118
-
119
- - **`qa waveform --start <s> --end <s> [--job-dir <dir>] [--json]`**
120
- Same, for a waveform: downloads `<job>/qa/waveform_<start>_<end>.png` and writes the word list to
121
- `<job>/qa/waveform_<start>_<end>.words.json`. Prints both paths. Needs a video id.
122
-
123
- - **`job pull [--job-dir <dir>] [--only <name,name>] [--json]`**
124
- List the video's artifacts and fetch each (or the `--only` subset) into the job dir (default cwd),
125
- **preserving relative paths** (`resolved/plan.json` `<job>/resolved/plan.json`). Prints a summary.
126
- `.json` artifacts are written pretty-printed; others verbatim. Needs a video id. Allowlisted names include
127
- `word_dump.txt`, `takes_packed.md`, `flags.txt`, `coverage.json`, `edl.json`, `verify.json`,
128
- `cut_boundaries.json`, `timeline.json`, `resolved/plan.json`, `resolved/diagnostics.json`.
129
-
130
- - **`review pull [--job-dir <dir>] [--source] [--json]`**
131
- Fetch the clipready review session for the video into the job dir (default cwd): writes
132
- `<job>/review/round.json` (round/run ids, mode, status, requested changes) and
133
- `<job>/review/instruction.md` (the round's editorial instruction or a "no active round" note).
134
- Writes `<job>/timeline.json` from the session ONLY when no local timeline.json exists (never
135
- overwrites yours). With `--source`, also downloads the source video (to the `source.json`
136
- filename, else `<job>/source.mp4`) when absent locally. Needs a video id.
137
-
138
- - **`review push (--stage <type> [--message <text>] | --timeline | --complete --duration <s> [--outcomes <file>]) [--job-dir <dir>] [--run-id <id>] [--json]`**
139
- Push review-round events (exactly one mode per call; run id defaults to `review/round.json`
140
- from `review pull`). `--stage` posts a progress event
141
- (`provisioning|transcribing|edl|render_preview|qc|render_final|uploading|log`), optional
142
- `{message}` payload. `--timeline` compiles `<job>/timeline.json` locally (same sequence as
143
- `timeline compile`, needs ffmpeg) and pushes a `timeline_update` with the raw timeline JSON,
144
- the compiled plan, and its hash the review page updates live. `--complete` compiles fresh
145
- (must be clean) and pushes the terminal `completed` event
146
- (`{edl, timeline, plan, duration_s, outcomes?}`; `--outcomes` is a JSON file of
147
- `[{change_id, ok, note?}]`, bare array or `{outcomes: [...]}`). Compile failures print
148
- diagnostics and exit `2` (nothing is pushed); cloud errors exit `1`. Needs a video id.
149
- Both `--timeline` and `--complete` **upload the timeline's referenced assets
150
- automatically** (image/sticker overlays, audio beds): each ref is sha256-cached in
151
- `<job>/review/assets.json` so unchanged files are never re-uploaded, and the push
152
- payload includes an `assets: {ref: asset_id}` manifest. A missing asset file fails the
153
- compile (`asset-missing`) before anything is uploaded.
154
-
155
- - **`skill install [--target <dir>] [--json]`**
156
- Copy the bundled `video-editing` agent skill into `<target|~/.claude/skills>/video-editing`
157
- (overwriting). Prints what was installed.
71
+ One status GET: `pending|running|completed|failed` (+ `video_url` when
72
+ completed). `failed` → exit `1`.
73
+
74
+ ## Verification / QA commands
75
+
76
+ - **`verify --job-dir <dir> [--json]`**
77
+ **Cloud verification** of the rendered preview: uploads/points at the
78
+ preview and the server re-checks every join for duplicated phrases (a
79
+ retake left in error) and over-long gaps (dead air → warning/error).
80
+ Writes `verify.json`; exit `2` on needs-fixes. Requires a rendered preview
81
+ (`compose` + hyperframes render, or `cloud render --mode preview`).
82
+
83
+ - **`qa frames --range <start>-<end> [--cols <n>] [--interval <s>] --job-dir <dir> [--json]`**
84
+ **Local ffmpeg** filmstrip PNG for the window
85
+ `<job>/qa/frames_<start>_<end>.png`. Read the PNG to inspect frames.
86
+
87
+ - **`qa waveform --range <start>-<end> --job-dir <dir> [--json]`**
88
+ **Local ffmpeg** waveform PNG + word-timing sidecar
89
+ `<job>/qa/waveform_<start>_<end>.png` and
90
+ `<job>/qa/waveform_<start>_<end>.words.json` (word list with timings for
91
+ the window). Free and fastuse for cut-edge adjudication.
92
+
93
+ ## File sync commands
94
+
95
+ - **`files pull --job-dir <dir> [--only <name,name>] [--json]`**
96
+ List the cloud job's artifacts and fetch each (or the `--only` subset) into
97
+ the job dir, **preserving relative paths** (`resolved/plan.json`
98
+ `<job>/resolved/plan.json`, `prompts/author-edl.prompt.md`
99
+ `<job>/prompts/author-edl.prompt.md`). `.json` artifacts pretty-printed. Use to
100
+ recover job state on a fresh machine.
101
+
102
+ - **`files push --job-dir <dir> [--only <name,name>] [--json]`**
103
+ Upload local job artifacts (e.g. `timeline.json`, referenced assets under
104
+ `assets/`) to the cloud job. Content-hash-cached unchanged files are not
105
+ re-uploaded.
106
+
107
+ ## Review round commands (ClipReady review sessions)
108
+
109
+ - **`review pull --job-dir <dir> [--source] [--json]`**
110
+ Fetch the review session: writes `<job>/review/round.json` (round/run ids,
111
+ mode, status, requested changes) and `<job>/review/instruction.md`. Writes
112
+ `<job>/timeline.json` from the session ONLY when no local one exists (never
113
+ overwrites yours). `--source` also downloads the source video when absent.
114
+
115
+ - **`review push (--stage <type> [--message <text>] | --timeline | --complete --duration <s> [--outcomes <file>]) --job-dir <dir> [--run-id <id>] [--json]`**
116
+ Push review-round events (one mode per call; run id defaults to
117
+ `review/round.json`). `--stage` posts a progress event
118
+ (`provisioning|transcribing|edl|render_preview|qc|render_final|uploading|log`).
119
+ `--timeline` compiles `<job>/timeline.json` (same as `timeline compile`,
120
+ exit `2` if not clean) and pushes a `timeline_update` — the review page
121
+ updates live. `--complete` compiles fresh (must be clean) and pushes the
122
+ terminal `completed` event (`{edl, timeline, plan, duration_s, outcomes?}`;
123
+ `--outcomes` is a JSON file of `[{change_id, ok, note?}]`). Both
124
+ `--timeline` and `--complete` upload the timeline's referenced assets
125
+ automatically (sha256-cached in `<job>/review/assets.json`).
158
126
 
159
127
  ## Utility
160
128
 
161
129
  - **`--version`** — print the CLI version.
162
- - **`status --job-dir <dir> [--json]`** — job state + artifact existence.
163
- - **`review prompt --job-dir <dir> [--write-warnings]`** — write the review prompt;
164
- optionally convert `review.json` → `warnings.json`. (`--open-app` is not usable on the
165
- sandbox — it launches a local browser; skip it, there is no display.) This was the old
166
- top-level `review` verb — `review` is now a group (`prompt` / `pull` / `push`).
167
- - **`config set-key <key>` / `config path`** — manage the ElevenLabs key
168
- (`~/.config/video-editing/.env`; on the sandbox the CLI reads env `ELEVENLABS_API_KEY`,
169
- no need to run `config set-key`).
130
+ - **`status --job-dir <dir> [--json]`** — cloud job state + local artifact existence.
131
+ - **`skill install [--target <dir>] [--json]`** — copy the bundled
132
+ `video-editing` agent skill into `<target|~/.claude/skills>/video-editing`.
170
133
 
171
134
  ## Typical session
172
135
 
173
136
  ```
174
- video-editing init-job --source "source.mp4" --job-dir /vercel/sandbox/jobs/<job_id>
175
- video-editing transcribe --job-dir /vercel/sandbox/jobs/<job_id>
176
- # read flags.txt (Gate 1), author edl.json
177
- video-editing render --job-dir /vercel/sandbox/jobs/<job_id> --mode preview
178
- video-editing verify --job-dir /vercel/sandbox/jobs/<job_id> --json # Gate 2
179
- # fix edl.json as needed, re-render, re-verify
180
- video-editing render --job-dir /vercel/sandbox/jobs/<job_id> --mode final
137
+ export CLIPREADY_API_BASE=https://… CLIPREADY_API_KEY=…
138
+ video-editing init --video "clip.mp4" --job-dir jobs/clip
139
+ video-editing transcribe --job-dir jobs/clip
140
+ # READ jobs/clip/prompts/author-edl.prompt.md it is the editorial brief. Author timeline.json.
141
+ video-editing timeline compile --job-dir jobs/clip --json # fix until exit 0
142
+ video-editing compose --job-dir jobs/clip --render # local preview render
143
+ video-editing verify --job-dir jobs/clip --json # fix → recompile → re-render → re-verify
144
+ video-editing qa frames --range 0-5 --job-dir jobs/clip # spot-check looks
145
+ video-editing cloud render --job-dir jobs/clip --mode final --wait
181
146
  ```
@@ -1,44 +1,4 @@
1
- # Editing brief authoring the EDL
1
+ # Editing brief (moved server-side)
2
2
 
3
- The standing style for a single talking-head vertical reel and the exact
4
- step-by-step for authoring `<job>/edl.json`. All execution is via the
5
- `video-editing` CLI; you only write the EDL.
6
-
7
- ## Standing brief (apply exactly)
8
-
9
- - **Output VERTICAL 9:16.** The CLI bakes `vertical_src.mp4`; point the EDL at it.
10
- - **CUT:** bad retakes, false starts, cut-off / stuttered words — keep the **LAST
11
- complete take**, EXCEPT keep the **CLEANEST** take when an earlier take is clean
12
- and a later one stutters into completion.
13
- - **TIGHTEN EVERY PAUSE:** trim 0.3–1s inter-phrase gaps down to ~0.12–0.14s of air.
14
- - **COLD-OPEN** on the strongest hook (trim weak/dead intro).
15
- - **TRIM outro dead air** (footsteps / ambient / silence / trailing breaths / device noise).
16
- - **CLEAN CUTS ONLY:** `grade:"none"`, no subtitles, no overlays.
17
- - **KEEP intentional rhetorical repeats.**
18
-
19
- ### Retake-vs-intentional discriminator (for a flagged repeated phrase)
20
-
21
- - **RETAKE** (cut it, keep the last/cleanest complete pass) if the earlier
22
- instance cuts off mid-word (a fragment / trailing "-") OR is immediately restarted.
23
- - **INTENTIONAL** (keep BOTH) if both instances are complete and serve rhetoric /
24
- parallel structure and are separated by other content.
25
- - Decide every flagged repeat — never blind-cut.
26
-
27
- ## Steps
28
-
29
- 1. **Init + transcribe + screen** (CLI does these): `init-job` → `transcribe`.
30
- Then read `<job>/flags.txt` (Gate 1) and confirm `<job>/coverage.json`.
31
- 2. **Read the word-level transcript** at `<job>/word_dump.txt` (every word/audio_event
32
- as `[start-end] type: text` with `---- gap Xs ----` at gaps ≥0.30s). THINK HARD and
33
- list, with exact timestamps: every retake/false-start/stutter (and which take to KEEP),
34
- every silence (head/inter-phrase/outro), the cold-open point, the intentional repeats.
35
- When text and audio seem to disagree, `video-editing inspect --video vertical_src --start <a> --end <b>` and read the PNG.
36
- 3. **Write `<job>/edl.json`** — KEEP segments in source seconds; gaps between them are
37
- the cuts. Snap every in/out to a transcript word boundary (lead ~0.05s, trail ~0.08s;
38
- ~0.03–0.05s at retake joins, clamped to stay inside the silence and never include a
39
- false-start word). Ranges chronological, non-overlapping. `total_duration_s` = Σ(end−start).
40
- **A retake range must END at the LAST CLEAN WORD before the abandoned attempt.**
41
- 4. **Render** `--mode preview`, then **verify** (Gate 2), fix, repeat. Finalize `--mode final`.
42
-
43
- See `cli-reference.md` for exact commands, `hard-rules.md` for correctness, and
44
- `scribe-collapse.md` / `adversarial-review.md` for the two gates.
3
+ The full editorial brief now arrives from the ClipReady cloud as `<job>/prompts/author-edl.prompt.md`
4
+ (pulled by `video-editing transcribe` / `files pull`). Read and follow the pulled prompts — this file is a stub.
@@ -1,38 +1,4 @@
1
- # Hard rules (production correctness — non-negotiable)
1
+ # Hard rules (moved server-side)
2
2
 
3
- These produce **silent failures** if violated. The CLI enforces the rendering
4
- rules internally; the EDL-authoring rules are on you.
5
-
6
- ## The CLI guarantees (do not try to replicate by hand)
7
-
8
- - **Per-segment extract → lossless `-c copy` concat** (no double-encode).
9
- - **30ms audio fades at every segment boundary** (`afade` in/out) — which is why
10
- tight pads (down to ~30ms) at retake joins are safe.
11
- - **Loudnorm** to −14 LUFS / −1 dBTP / LRA 11 (two-pass for final, one-pass for preview).
12
- - Subtitles, if ever enabled, are applied LAST in the filter chain.
13
- - Word-level verbatim ASR with auto-heal; transcripts cached per source.
14
-
15
- ## EDL-authoring rules (yours to uphold)
16
-
17
- - **Never cut inside a word.** Snap every edge to a transcript word boundary.
18
- - **Pad every cut edge** (30–200ms). Scribe timestamps drift 50–100ms; padding absorbs it.
19
- Tightest (~0.03–0.05s) at retake joins, staying inside the silence.
20
- - A **retake range ends at the last clean word BEFORE the abandoned attempt.**
21
- - Clipped tokens ending in `-` (`s-`, `re-`, `li-`) are danger zones — leave an 80–150ms
22
- guard band before them when there's room.
23
- - Keep the first token of the chosen take even if it's a connector ("and/so/but").
24
- - `grade:"none"`, `overlays:[]`, no subtitles (clean-cut pass).
25
- - Keep `total_duration_s` = Σ(end−start); ranges chronological + non-overlapping.
26
-
27
- ## The two mandatory gates
28
-
29
- 1. **SCREEN before cutting** — read `flags.txt`; resolve every [A], judge every [B]. See `scribe-collapse.md`.
30
- 2. **CONTENT-VERIFY after preview** — `video-editing verify`; a visual/waveform check alone
31
- misses a retake left in. See `adversarial-review.md`.
32
-
33
- ## Anti-patterns (consistently fail)
34
-
35
- - Trusting the transcript without screening it (Scribe collapses/drops hide retakes).
36
- - Running ffmpeg or ad-hoc helper scripts by hand — forbidden; use only the `video-editing` CLI.
37
- - A visual-only check at a retake join (the duplicated content reads as continuous clean audio).
38
- - Re-transcribing an unchanged source (paid + pointless; it's cached).
3
+ The production-correctness rules now arrive from the ClipReady cloud inside `<job>/prompts/*.md`
4
+ (pulled by `video-editing transcribe` / `files pull`). Read and follow the pulled prompts this file is a stub.
@@ -1,37 +1,4 @@
1
- # Gate 1 the Scribe collapse / drop gotcha
1
+ # Screening gate (moved server-side)
2
2
 
3
- The single most important thing before reasoning about cuts: **retakes hide in
4
- the transcript.** Trust the text without screening and you will leave duplicated
5
- content in the cut.
6
-
7
- ## What happens
8
-
9
- When Scribe hits a hard-to-segment chunk (fast speech, a stutter, a false start
10
- immediately followed by the retake), it sometimes:
11
-
12
- - **Collapses** the chunk into ONE over-long token (a "word" lasting >~1.2s), or
13
- - **Drops** a stretch of audio silently — no tokens for that span.
14
-
15
- Either way the retake is invisible in the text, a waveform looks fine, and the
16
- cut "reads" clean — but the abandoned take is still in the render.
17
-
18
- ## How the CLI + you catch it
19
-
20
- 1. **`video-editing transcribe` auto-heals** most collapses/drops (re-transcribes the
21
- suspect window in isolation and splices the recovered words back). Watch its log.
22
- 2. **`video-editing transcribe` writes `flags.txt`** — read it (Gate 1):
23
- - **[A]** over-long / collapsed tokens (>~1.2s) — content is hidden inside one of these.
24
- - **[B]** repeated phrases — the retake fingerprint (false starts, reworded restarts).
25
- - **[C]** audio events + big gaps.
26
- Resolve every [A]; judge every [B] (retake vs intentional).
27
- 3. **Verify coverage** via `coverage.json`: the last word must end within ~2s of the
28
- media duration. If it ends well before EOF, a tail was dropped.
29
-
30
- ## When a span is still suspect
31
-
32
- Inspect it: `video-editing inspect --job-dir <job> --video vertical_src --start <a> --end <b>`
33
- and read the filmstrip+waveform PNG to see what was actually said before choosing the cut.
34
-
35
- > Screening + inspecting suspicious windows is what isolates retakes Scribe collapsed
36
- > into one token. Skipping it is the #1 cause of a "clean-looking" cut that still has a
37
- > retake in it.
3
+ The transcript-screening procedure (Gate 1) now arrives from the ClipReady cloud inside `<job>/prompts/*.md`
4
+ (pulled by `video-editing transcribe` / `files pull`). Read and follow the pulled prompts — this file is a stub.
@@ -2,8 +2,8 @@
2
2
 
3
3
  Every feature of the authored `<job>/timeline.json` (version 2), with one minimal JSON
4
4
  example each. Validate with `video-editing timeline validate`; compile with
5
- `timeline compile` (it resolves phrase anchors, derives caption cues and emits
6
- `resolved/plan.json` + legacy `edl.json`). Items all carry a unique `id`; word anchors
5
+ `timeline compile` (cloud compile — it resolves phrase anchors, derives caption cues
6
+ and emits `resolved/plan.json`). Items all carry a unique `id`; word anchors
7
7
  (`{type:"words", source, phrase}`) resolve via the transcript — use `timeline resolve`
8
8
  to disambiguate. Capability status per feature: run `timeline validate` — `staged`
9
9
  features compile but warn (render path not yet proven); `ready` features render via
Binary file