cueframe 0.4.10 → 0.7.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.
- package/LICENSE +202 -661
- package/NOTICE +10 -0
- package/README.md +9 -8
- package/dist/analyze-5OURFQXO.js +2 -0
- package/dist/chunk-56LDB4H5.js +12 -0
- package/dist/cueframe.js +103 -48
- package/dist/skills/add-music-bed/SKILL.md +12 -7
- package/dist/skills/brand-reel/SKILL.md +19 -15
- package/dist/skills/clip-a-talking-head/SKILL.md +15 -7
- package/dist/skills/composing-video/SKILL.md +59 -314
- package/dist/skills/cueframe-brand-demo/SKILL.md +9 -2
- package/dist/skills/cueframe-cli/SKILL.md +57 -52
- package/dist/skills/cueframe-component-authoring/SKILL.md +64 -38
- package/dist/skills/cueframe-compose-loop/SKILL.md +20 -6
- package/dist/skills/cueframe-compose-loop/references/builtin-insertion.md +49 -0
- package/dist/skills/cueframe-compose-loop/references/builtin-requests.json +111 -0
- package/dist/skills/cueframe-connect/SKILL.md +17 -9
- package/dist/skills/cueframe-product-video/SKILL.md +15 -7
- package/dist/skills/cueframe-scene-shot/SKILL.md +8 -0
- package/dist/skills/cueframe-storyboard/SKILL.md +27 -55
- package/dist/skills/every-format-from-one-edit/SKILL.md +14 -8
- package/dist/skills/extracting-brand-kits/SKILL.md +8 -0
- package/dist/skills/launch-video/SKILL.md +17 -11
- package/dist/skills/make-a-social-reel/SKILL.md +19 -15
- package/dist/skills/rebrand-a-video/SKILL.md +18 -16
- package/dist/skills/video-craft-standards/SKILL.md +40 -47
- package/package.json +12 -12
- package/dist/analyze-CDC4H53Q.js +0 -2
- package/dist/chunk-QS37SCWN.js +0 -73
|
@@ -5,10 +5,17 @@ description: Use when editing, clipping, or rendering video via the CueFrame CLI
|
|
|
5
5
|
|
|
6
6
|
# CueFrame CLI
|
|
7
7
|
|
|
8
|
+
## Scope and capability policy
|
|
9
|
+
|
|
10
|
+
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
+
|
|
12
|
+
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
+
|
|
14
|
+
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
15
|
+
|
|
8
16
|
## MCP is the primary surface — read this before using the CLI
|
|
9
17
|
|
|
10
|
-
**
|
|
11
|
-
out to this CLI.** MCP is the supported, maintained integration surface: it hides transport and
|
|
18
|
+
**For a tool-driven workflow, prefer an existing supported MCP connection. For an explicitly requested terminal or CI workflow, use the CLI.** MCP is the supported, maintained integration surface: it hides transport and
|
|
12
19
|
contract details, its tools are generated from the same OpenAPI SSOT the CLI is, and it is where
|
|
13
20
|
new capability lands first. The `cueframe-connect` skill owns the setup for every host
|
|
14
21
|
(Claude Code, Claude/ChatGPT connectors, Cursor/Codex/VS Code/Windsurf/Zed, and the
|
|
@@ -24,11 +31,11 @@ both MCP and this CLI exist so you do not have to.
|
|
|
24
31
|
|
|
25
32
|
## Overview
|
|
26
33
|
|
|
27
|
-
The `cueframe` CLI drives the CueFrame platform from the terminal. Optimized for agents — every command supports `--json` (NDJSON event stream) and the binary self-describes via `npx -y cueframe describe --json`.
|
|
34
|
+
The `cueframe` CLI drives the CueFrame platform from the terminal. Optimized for agents — every command supports `--json` (NDJSON event stream) and the binary self-describes via `npx -y cueframe@0.7 describe --json`.
|
|
28
35
|
|
|
29
|
-
**Run it as `npx -y cueframe …` — every command in this skill is written that way, and
|
|
36
|
+
**Run it as `npx -y cueframe@0.7 …` — every command in this skill is written that way, and
|
|
30
37
|
that form is executable verbatim.** There is no `cueframe` on your PATH unless you put it
|
|
31
|
-
there: `npx -y cueframe install` wires the MCP server and drops these skills, but npx
|
|
38
|
+
there: `npx -y cueframe@0.7 install` wires the MCP server and drops these skills, but npx
|
|
32
39
|
unpacks to an ephemeral cache, so it installs no binary. `npx` re-resolves the current
|
|
33
40
|
version on each call (~0.5s warm, ~5s cold), which also means these commands never go
|
|
34
41
|
stale. If you are running many in a row and want to skip that, `npm i -g cueframe` once
|
|
@@ -39,9 +46,9 @@ the documented path.
|
|
|
39
46
|
**The framework is three verbs:** `upload` (register media) → `composition put` (author the timeline) → `render` (→ MP4). The `Composition` is the contract — render takes the saved composition, nothing else. Everything domain-specific (AI clip suggestions, FCPXML/Premiere export) is a **use-case on-ramp** layered on top, not part of the core.
|
|
40
47
|
|
|
41
48
|
**Core principle — discover, don't guess.** Never author a composition from the
|
|
42
|
-
examples below alone. The live contract is `npx -y cueframe schema composition` (prints
|
|
49
|
+
examples below alone. The live contract is `npx -y cueframe@0.7 schema composition` (prints
|
|
43
50
|
the real wire schema the server enforces); confirm any draft with
|
|
44
|
-
`npx -y cueframe composition validate -b @file.json` BEFORE you render. Validation is
|
|
51
|
+
`npx -y cueframe@0.7 composition validate -b @file.json` BEFORE you render. Validation is
|
|
45
52
|
free and instant; a render is neither. The examples here are orientation — the
|
|
46
53
|
schema is the source of truth.
|
|
47
54
|
|
|
@@ -63,20 +70,20 @@ delivery, not checking each edit. CLI validation does not replace visual evidenc
|
|
|
63
70
|
# Commands run against production; auth is stored in ~/.cueframe/auth.json.
|
|
64
71
|
|
|
65
72
|
# 1. Register media (one or many — mixed video / image / audio).
|
|
66
|
-
npx -y cueframe upload "/path/to/source.mp4" --json # → mediaItemId (process_complete)
|
|
73
|
+
npx -y cueframe@0.7 upload "/path/to/source.mp4" --json # → mediaItemId (process_complete)
|
|
67
74
|
|
|
68
75
|
# 2. Create a project (sets aspect/format).
|
|
69
|
-
npx -y cueframe project create -n "promo" -a 9:16 --json # → projectId
|
|
76
|
+
npx -y cueframe@0.7 project create -n "promo" -a 9:16 --json # → projectId
|
|
70
77
|
|
|
71
78
|
# 3. Author the composition: tracks of clips (per-clip reframe/trim), optional
|
|
72
79
|
# captions (captions.segments), brandKitId. The composition is the SSOT.
|
|
73
80
|
# Discover the live schema, then validate the draft BEFORE saving/rendering:
|
|
74
|
-
npx -y cueframe schema composition # → live wire schema
|
|
75
|
-
npx -y cueframe composition validate -b @composition.json # → ✓ valid | per-field errors (no render)
|
|
76
|
-
npx -y cueframe composition put <projectId> -b @composition.json # ETag auto
|
|
81
|
+
npx -y cueframe@0.7 schema composition # → live wire schema
|
|
82
|
+
npx -y cueframe@0.7 composition validate -b @composition.json # → ✓ valid | per-field errors (no render)
|
|
83
|
+
npx -y cueframe@0.7 composition put <projectId> -b @composition.json # ETag auto
|
|
77
84
|
|
|
78
85
|
# 4. Render the saved composition to MP4. SSE-watches + downloads when done.
|
|
79
|
-
npx -y cueframe render <projectId> -o ./out.mp4 --json
|
|
86
|
+
npx -y cueframe@0.7 render <projectId> -o ./out.mp4 --json
|
|
80
87
|
# → render_queued → render_progress* → render_complete
|
|
81
88
|
#
|
|
82
89
|
# `render` takes ONLY a projectId and renders the SAVED composition (tracks +
|
|
@@ -85,14 +92,14 @@ npx -y cueframe render <projectId> -o ./out.mp4 --json
|
|
|
85
92
|
# a hand-authored composition; if absent, the clip is rendered without captions.
|
|
86
93
|
|
|
87
94
|
# Reattach to an in-flight render later (e.g. after disconnect):
|
|
88
|
-
npx -y cueframe render watch <renderId> -p <projectId> -o ./out.mp4 --json
|
|
95
|
+
npx -y cueframe@0.7 render watch <renderId> -p <projectId> -o ./out.mp4 --json
|
|
89
96
|
```
|
|
90
97
|
|
|
91
98
|
## Anatomy of a composition.json
|
|
92
99
|
|
|
93
100
|
This section orients you to the shape; the authoritative contract is
|
|
94
|
-
`npx -y cueframe schema composition` (the live wire schema) — run it when a field is
|
|
95
|
-
unclear, and `npx -y cueframe composition validate -b @file.json` to check a draft.
|
|
101
|
+
`npx -y cueframe@0.7 schema composition` (the live wire schema) — run it when a field is
|
|
102
|
+
unclear, and `npx -y cueframe@0.7 composition validate -b @file.json` to check a draft.
|
|
96
103
|
|
|
97
104
|
`composition put` takes the **bare** `Composition` object (no wrapper; the CLI POSTs
|
|
98
105
|
the `@file` verbatim and handles the ETag). Minimal valid shape:
|
|
@@ -159,18 +166,18 @@ the composition yourself (above).
|
|
|
159
166
|
|
|
160
167
|
```bash
|
|
161
168
|
# 1. Upload + chain the AI clip pass.
|
|
162
|
-
npx -y cueframe upload "/path/to/source.mp4" --analyze --json # mediaItemId + suggestions
|
|
163
|
-
# (or run it explicitly: npx -y cueframe analyze <mediaItemId> --wait --json)
|
|
169
|
+
npx -y cueframe@0.7 upload "/path/to/source.mp4" --analyze --json # mediaItemId + suggestions
|
|
170
|
+
# (or run it explicitly: npx -y cueframe@0.7 analyze <mediaItemId> --wait --json)
|
|
164
171
|
|
|
165
172
|
# 2. List clip suggestions (publicId sug_…, title, startMs/endMs, score).
|
|
166
|
-
npx -y cueframe clips <mediaItemId> --json
|
|
173
|
+
npx -y cueframe@0.7 clips <mediaItemId> --json
|
|
167
174
|
|
|
168
175
|
# 3. Create a project AND author its composition from the chosen suggestion.
|
|
169
|
-
npx -y cueframe project create -n "paul-klein-shorts" -a 9:16 --from-suggestion <sug_…> --json
|
|
170
|
-
# (or, on an existing project: npx -y cueframe composition from-suggestion <projectId> -s <sug_…>)
|
|
176
|
+
npx -y cueframe@0.7 project create -n "paul-klein-shorts" -a 9:16 --from-suggestion <sug_…> --json
|
|
177
|
+
# (or, on an existing project: npx -y cueframe@0.7 composition from-suggestion <projectId> -s <sug_…>)
|
|
171
178
|
|
|
172
179
|
# 4. Render — same framework verb as above.
|
|
173
|
-
npx -y cueframe render <projectId> -o ./out.mp4 --json
|
|
180
|
+
npx -y cueframe@0.7 render <projectId> -o ./out.mp4 --json
|
|
174
181
|
```
|
|
175
182
|
|
|
176
183
|
Both flows converge on `composition put` → `render`; the on-ramp just authors the
|
|
@@ -187,51 +194,51 @@ video and composites it (the shared renderer never runs your code).
|
|
|
187
194
|
|
|
188
195
|
```bash
|
|
189
196
|
# 1. Scaffold a workspace (writes cueframe.json + cueframe/components/). Idempotent.
|
|
190
|
-
npx -y cueframe init --json
|
|
197
|
+
npx -y cueframe@0.7 init --json
|
|
191
198
|
|
|
192
199
|
# 2a. Scaffold a component in cueframe/components/<id>/ as owned, editable source.
|
|
193
|
-
npx -y cueframe new component my-badge --json
|
|
200
|
+
npx -y cueframe@0.7 new component my-badge --json
|
|
194
201
|
|
|
195
|
-
#
|
|
196
|
-
#
|
|
197
|
-
# cueframe/components/my-badge/index.tsx as your starting point.
|
|
202
|
+
# Built-in forks require an exact v3 sourceSnapshot; retain its TSX, definition and manifest.
|
|
203
|
+
# The CLI sends index.tsx + definition.json + the workspace asset manifest as one v3 source.
|
|
198
204
|
|
|
199
205
|
# 3. Edit cueframe/components/<id>/ — it's standard Remotion. The component is mounted
|
|
200
|
-
#
|
|
206
|
+
# with params/assets/render; definition.json declares its source-v3 capabilities and timing.
|
|
207
|
+
# The nested asset manifest remains version 2.
|
|
201
208
|
|
|
202
209
|
# 4. Publish to CueFrame so it can render (uploads index.tsx as the component's tsxSource).
|
|
203
|
-
npx -y cueframe push my-badge --json # one component
|
|
204
|
-
npx -y cueframe sync --json # every component in the workspace
|
|
210
|
+
npx -y cueframe@0.7 push my-badge --json # one component
|
|
211
|
+
npx -y cueframe@0.7 sync --json # every component in the workspace
|
|
205
212
|
|
|
206
213
|
# 5. Reference the component id in your composition as a {kind:'component', componentId, props}
|
|
207
214
|
# clip, then render with the same verb. Preview a single component first via the MCP
|
|
208
215
|
# preview_component loop.
|
|
209
|
-
npx -y cueframe render <projectId> -o ./out.mp4 --json
|
|
216
|
+
npx -y cueframe@0.7 render <projectId> -o ./out.mp4 --json
|
|
210
217
|
```
|
|
211
218
|
|
|
212
219
|
## Quick reference
|
|
213
220
|
|
|
214
221
|
| Need to… | Command |
|
|
215
222
|
|---|---|
|
|
216
|
-
| See every command + flags | `npx -y cueframe describe --json` |
|
|
217
|
-
| Install/refresh managed skills | `npx -y cueframe install` (shared `~/.agents/skills` and Claude `~/.claude/skills`; locally changed or untracked packages are preserved and reported) |
|
|
218
|
-
| List projects | `npx -y cueframe list -n 50` |
|
|
219
|
-
| List your media | `npx -y cueframe clips` (no mediaId arg) |
|
|
220
|
-
| Discover the live composition schema | `npx -y cueframe schema composition` |
|
|
221
|
-
| Validate a draft (no save, no render) | `npx -y cueframe composition validate -b @plan.json` |
|
|
222
|
-
| Read composition + ETag | `npx -y cueframe composition get <projectId> --json` |
|
|
223
|
-
| Write composition | `npx -y cueframe composition put <projectId> -b @plan.json` (ETag auto) |
|
|
224
|
-
| Export to Final Cut | `npx -y cueframe export fcpxml <projectId> -s <sug> --wait -o cut.zip` |
|
|
225
|
-
| Export to Premiere | `npx -y cueframe export premiere <projectId> -s <sug> --wait -o cut.zip` |
|
|
226
|
-
| Anything not wrapped | `npx -y cueframe api GET /v1/... -i` (escape hatch, like `gh api`) |
|
|
227
|
-
| Validate a composition without mutating | `npx -y cueframe composition validate -b @plan.json` |
|
|
223
|
+
| See every command + flags | `npx -y cueframe@0.7 describe --json` |
|
|
224
|
+
| Install/refresh managed skills | `npx -y cueframe@0.7 install` (shared `~/.agents/skills` and Claude `~/.claude/skills`; locally changed or untracked packages are preserved and reported) |
|
|
225
|
+
| List projects | `npx -y cueframe@0.7 list -n 50` |
|
|
226
|
+
| List your media | `npx -y cueframe@0.7 clips` (no mediaId arg) |
|
|
227
|
+
| Discover the live composition schema | `npx -y cueframe@0.7 schema composition` |
|
|
228
|
+
| Validate a draft (no save, no render) | `npx -y cueframe@0.7 composition validate -b @plan.json` |
|
|
229
|
+
| Read composition + ETag | `npx -y cueframe@0.7 composition get <projectId> --json` |
|
|
230
|
+
| Write composition | `npx -y cueframe@0.7 composition put <projectId> -b @plan.json` (ETag auto) |
|
|
231
|
+
| Export to Final Cut | `npx -y cueframe@0.7 export fcpxml <projectId> -s <sug> --wait -o cut.zip` |
|
|
232
|
+
| Export to Premiere | `npx -y cueframe@0.7 export premiere <projectId> -s <sug> --wait -o cut.zip` |
|
|
233
|
+
| Anything not wrapped | `npx -y cueframe@0.7 api GET /v1/... -i` (escape hatch, like `gh api`) |
|
|
234
|
+
| Validate a composition without mutating | `npx -y cueframe@0.7 composition validate -b @plan.json` |
|
|
228
235
|
|
|
229
236
|
## Auth
|
|
230
237
|
|
|
231
238
|
Commands run against production. Authenticate once:
|
|
232
239
|
|
|
233
|
-
- `npx -y cueframe login` — OAuth device flow (laptops).
|
|
234
|
-
- `npx -y cueframe auth <cf_live_… key>` — save a static API key (CI / headless).
|
|
240
|
+
- `npx -y cueframe@0.7 login` — OAuth device flow (laptops).
|
|
241
|
+
- `npx -y cueframe@0.7 auth <cf_live_… key>` — save a static API key (CI / headless).
|
|
235
242
|
|
|
236
243
|
Creds are stored in `~/.cueframe/auth.json`; the key can also come from the `CUEFRAME_API_KEY` env var.
|
|
237
244
|
|
|
@@ -249,17 +256,15 @@ Errors come as `{"event":"error", "phase":"<step>", "message":"...", "code":"...
|
|
|
249
256
|
|
|
250
257
|
| Mistake | Reality |
|
|
251
258
|
|---|---|
|
|
252
|
-
| Reaching for `curl …/v1/...` because the CLI didn't have a command | Use `npx -y cueframe api METHOD /v1/...` — same auth, same JSON pipeline. |
|
|
253
|
-
| Polling for render completion with a sleep loop | `npx -y cueframe render` already SSE-watches and exits when done. Use `render watch <id>` to reattach. |
|
|
259
|
+
| Reaching for `curl …/v1/...` because the CLI didn't have a command | Use `npx -y cueframe@0.7 api METHOD /v1/...` — same auth, same JSON pipeline. |
|
|
260
|
+
| Polling for render completion with a sleep loop | `npx -y cueframe@0.7 render` already SSE-watches and exits when done. Use `render watch <id>` to reattach. |
|
|
254
261
|
| Skipping `--json` and trying to parse human output | Human output is for humans. Agents always use `--json`. |
|
|
255
262
|
| Hand-editing the composition without an ETag | `composition put` GETs the ETag for you; `from-suggestion` rebuilds from a clip. Don't hand-craft unless you have to. |
|
|
256
|
-
| Calling `npx -y cueframe render <projectId> <suggestionId>` (old two-positional shape) | `render` takes ONLY a projectId; commander rejects the extra arg. It renders the SAVED composition — author it first via `composition put` (hand-author) or `project create --from-suggestion <sug>` (clip-finder on-ramp). |
|
|
263
|
+
| Calling `npx -y cueframe@0.7 render <projectId> <suggestionId>` (old two-positional shape) | `render` takes ONLY a projectId; commander rejects the extra arg. It renders the SAVED composition — author it first via `composition put` (hand-author) or `project create --from-suggestion <sug>` (clip-finder on-ramp). |
|
|
257
264
|
| Assuming `render` needs a clip suggestion / that captions only come from a suggestion | No — `render` renders the saved composition directly; a suggestion is optional. Captions come from `composition.captions` (author them in the `put` JSON). The clip-suggestion on-ramp just fills those captions for you by slicing the transcript at author time. |
|
|
258
265
|
|
|
259
266
|
## When this skill applies (routing)
|
|
260
267
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
Drop to raw `ffmpeg` only for a **single mechanical operation with zero creative or perceptual intent** — losslessly concatenating two finished files, transcoding a codec, extracting an audio track. That one carve-out aside, reach for `cueframe`.
|
|
268
|
+
Use this skill for a requested terminal/CI workflow or when the available CLI is the supported path for the task. If supported MCP tools are already connected, use their narrow edit/preview guidance instead. A mechanical operation inside a creative task does not require a different project or new installation. If a required capability is absent, report the limitation and a supported alternative; do not invent a command or silently change lanes.
|
|
264
269
|
|
|
265
|
-
|
|
270
|
+
CLI development and internal backend inspection are outside this usage skill.
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cueframe-component-authoring
|
|
3
|
-
description: Use when authoring, forking, or customizing a CueFrame motion-graphics component/primitive/graphic — e.g. "customize the cinematic-title primitive", "make my own animated lower-third", "fork a CueFrame template and edit it", "author a custom graphic and render it". Covers cloud MCP, local desktop, and CLI project paths
|
|
3
|
+
description: Use when authoring, forking, or customizing a CueFrame motion-graphics component/primitive/graphic — e.g. "customize the cinematic-title primitive", "make my own animated lower-third", "fork a CueFrame template and edit it", "author a custom graphic and render it". Covers cloud MCP, local desktop, and CLI project paths using complete versioned source snapshots. Use BEFORE hand-writing a component from scratch — forking a built-in is usually the faster start.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CueFrame component authoring (fork / customize / own)
|
|
7
7
|
|
|
8
|
+
## Scope and capability policy
|
|
9
|
+
|
|
10
|
+
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
+
|
|
12
|
+
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
+
|
|
14
|
+
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
15
|
+
|
|
8
16
|
Use `cueframe-compose-loop`'s [preview workflow](../cueframe-compose-loop/references/preview-workflow.md)
|
|
9
17
|
to select hosted or local evidence and separate iteration from final delivery.
|
|
10
18
|
|
|
11
|
-
CueFrame ships
|
|
12
|
-
effects, transitions
|
|
19
|
+
CueFrame ships built-in motion-graphics definitions (titles, lower-thirds, captions,
|
|
20
|
+
effects, transitions and layouts). Discover the current catalog; fork an exact definition, customize it,
|
|
13
21
|
and render it on CueFrame — or author a brand-new component. This is shadcn-for-video: own the
|
|
14
22
|
component code; CueFrame is the reliable engine that renders it.
|
|
15
23
|
|
|
@@ -18,32 +26,41 @@ component code; CueFrame is the reliable engine that renders it.
|
|
|
18
26
|
See the `cueframe-scene-shot` skill and `cueframe://scene-shot`. Author a component here when
|
|
19
27
|
you need behaviour the scene contract does not express.
|
|
20
28
|
|
|
21
|
-
**
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
**Source format matters:**
|
|
30
|
+
- Built-ins use source v3: keep the complete `sourceSnapshot`, including `definition`,
|
|
31
|
+
`manifest`, and `tsxSource`. Its definition declares input schema, defaults, timing,
|
|
32
|
+
brand/media bindings and capabilities. Do not infer these from the source code or flatten
|
|
33
|
+
a v3 source into a v2 module. The nested asset manifest can still have `version: 2`.
|
|
34
|
+
- Existing user-authored v2 sources use
|
|
35
|
+
`({ durationInFrames, params, assets, render }) => JSX`. Preserve their format when editing.
|
|
36
|
+
- Neither renderer runs authored source in the editor process. Local and hosted execution
|
|
37
|
+
use isolated render processes and exact immutable source revisions.
|
|
29
38
|
|
|
30
39
|
## Path A — MCP agent (no filesystem; source lives server-side)
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
1. **
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`
|
|
39
|
-
|
|
41
|
+
Use the live tool schema for request envelopes; hosted write fields are normally under `body`.
|
|
42
|
+
|
|
43
|
+
1. **Discover and read a built-in:** call `list_components` with
|
|
44
|
+
`projection: "component-library", origin: "builtin", libraryKind: "definition"`.
|
|
45
|
+
Select the intended card and preserve its complete scoped source reference. Call
|
|
46
|
+
`get_component_source` with that reference's `componentId`, `sourceVersionId`,
|
|
47
|
+
`builtinCollection` (its scope collection), and `supportedSourceVersions: "3"`.
|
|
48
|
+
ID-only builtin reads are unsupported. An unavailable exact pin is a refusal; never
|
|
49
|
+
retry another scope or an unpinned head.
|
|
50
|
+
2. **Author/own it:** edit the complete v3 `sourceSnapshot`; use your chosen owned ID
|
|
51
|
+
consistently in its `componentId` and the request. Send it as `body.source` to
|
|
52
|
+
`create_component`, with required metadata. Preserve its definition, capability
|
|
53
|
+
declarations, manifest and source format. For an existing component, keep its ID and
|
|
54
|
+
use `update_component` with the complete source. Do not send an old pin as the identity
|
|
55
|
+
of changed source: saving produces a new immutable source version.
|
|
40
56
|
3. **Iterate (author→preview→fix):** `preview_component({ componentId, params })` queues a durable
|
|
41
57
|
preview and returns a `jobId`; call `wait_job(kind:"preview")`. The typed terminal result is a
|
|
42
58
|
verified artifact produced by the same bundle contract used by final render. A failed
|
|
43
59
|
`component_does_not_compile` job carries the compiler error — read it, fix via `update_component`
|
|
44
60
|
(same id, in place), and preview again.
|
|
45
61
|
**Once the component is placed in a project, pass that project on every update:**
|
|
46
|
-
`update_component({ componentId, body: {
|
|
62
|
+
`update_component({ componentId, body: { source: editedSnapshot, projectId, compositionId? } })`
|
|
63
|
+
for v3; an existing v2 component uses its supported v2 edit fields. A placed clip
|
|
47
64
|
renders the exact version it pins; only the composition you name moves to the new version in the
|
|
48
65
|
same write (`repinned` says what moved). Without `projectId` your clips keep rendering the old
|
|
49
66
|
version, and `placementsPinnedToPrevious` counts them.
|
|
@@ -60,26 +77,32 @@ Source lives in `cueframe/components/<id>/` (the `cueframe.json` workspace); edi
|
|
|
60
77
|
standard Remotion, push to render.
|
|
61
78
|
|
|
62
79
|
```bash
|
|
63
|
-
npx -y cueframe init --json # scaffold cueframe.json + cueframe/components/
|
|
64
|
-
npx -y cueframe new component my-badge --json # scaffold a component in the workspace
|
|
65
|
-
#
|
|
66
|
-
#
|
|
80
|
+
npx -y cueframe@0.7 init --json # scaffold cueframe.json + cueframe/components/
|
|
81
|
+
npx -y cueframe@0.7 new component my-badge --json # scaffold a component in the workspace
|
|
82
|
+
# New scaffolds contain index.tsx, config.ts and definition.json (source v3).
|
|
83
|
+
# For a builtin fork, retain its TSX, complete definition and asset manifest together.
|
|
67
84
|
# …edit cueframe/components/<id>/ in your editor (standard Remotion)…
|
|
68
|
-
npx -y cueframe push my-badge --json # upload index.tsx as the component tsxSource
|
|
69
|
-
# or: npx -y cueframe sync --json # push every component in the workspace
|
|
85
|
+
npx -y cueframe@0.7 push my-badge --json # upload index.tsx as the component tsxSource
|
|
86
|
+
# or: npx -y cueframe@0.7 sync --json # push every component in the workspace
|
|
70
87
|
# reference the component id in your composition, then render:
|
|
71
|
-
npx -y cueframe render <projectId> -o ./out.mp4 --json
|
|
88
|
+
npx -y cueframe@0.7 render <projectId> -o ./out.mp4 --json
|
|
72
89
|
```
|
|
73
90
|
|
|
74
|
-
The CLI writes
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
The CLI writes `index.tsx` (module), `config.ts` (metadata) and `definition.json` (complete v3
|
|
92
|
+
input schema, defaults, timing and capabilities). Its asset manifest lives at
|
|
93
|
+
`cueframe.json` → `components.<id>.manifest`; that nested manifest retains version 2.
|
|
94
|
+
`push`/`sync` send these as one v3 `source` snapshot. For a builtin fork, copy **all three source
|
|
95
|
+
parts** from the selected `sourceSnapshot`: TSX, definition and manifest; choose the owned ID
|
|
96
|
+
consistently. Never replace a definition with the blank scaffold's defaults.
|
|
97
|
+
Older workspaces without `definition.json` are refused before API calls: review and declare
|
|
98
|
+
their real behavior instead of running `new --force` over existing source. To preview before
|
|
99
|
+
a full render, push it and use the appropriate component preview loop.
|
|
77
100
|
|
|
78
101
|
## Path C — Director editing a local desktop project (project-embedded source)
|
|
79
102
|
|
|
80
103
|
When `get_context` reports the project lane as local, motion does not require an account or an org
|
|
81
104
|
component. When exposed, use `open_component_preview` to compile an isolated preview (new source,
|
|
82
|
-
or `component_id`
|
|
105
|
+
with an explicit `component_definition`, or `component_id` to preserve an existing library source), `update_component_preview`
|
|
83
106
|
with exact-text edits (`{oldText, newText, replaceAll?}`, each `oldText` matching once), and
|
|
84
107
|
`render_component_preview_frame` for exact frame evidence. Inspect playback for motion;
|
|
85
108
|
`commit_component_preview` publishes the checked source to the library and pins the clip, with a
|
|
@@ -103,6 +126,7 @@ timeline. An inline custom overlay has this shape:
|
|
|
103
126
|
"params": {
|
|
104
127
|
"jsxSource": "export default function Graphic({ durationInFrames, params, assets, render }) { ... }",
|
|
105
128
|
"componentManifest": { "version": 2, "assets": {}, "graphics": { "api": "canvas2d", "required": true, "accelerationPreference": "software-allowed" }, "alphaPolicy": "requires-transparency" },
|
|
129
|
+
"componentDefinition": { "inputSchema": { "type": "object", "properties": {}, "additionalProperties": false }, "defaults": {}, "timing": { "defaultDuration": { "frames": 90, "fps": 30 } }, "brandBindings": [], "capabilities": [{ "kind": "clip" }] },
|
|
106
130
|
"componentAssets": {}
|
|
107
131
|
}
|
|
108
132
|
}
|
|
@@ -112,7 +136,9 @@ timeline. An inline custom overlay has this shape:
|
|
|
112
136
|
```
|
|
113
137
|
|
|
114
138
|
The desktop compiles the module in an isolated child process and creates it in the desktop's component
|
|
115
|
-
library
|
|
139
|
+
library as a complete v3 source. Declare the actual parameter schema and defaults in
|
|
140
|
+
`componentDefinition`; the empty schema above is for a graphic with no custom parameters.
|
|
141
|
+
Keep a fork's existing definition and nested manifest together with its source. Inline source creates a component only: a clip whose component already exists with other
|
|
116
142
|
source is refused as `component_exists`, and that component changes through edits.
|
|
117
143
|
The timeline and final export render that exact version; no preview media is baked. A compile failure
|
|
118
144
|
refuses the whole batch and leaves the composition untouched. Use `create_component` only for a reusable
|
|
@@ -132,10 +158,10 @@ loops, refs, constructors, typed arrays, canvas, and WebGPU when needed. Drive v
|
|
|
132
158
|
`render.frame`/`render.fps` and seed variation from `render.seed`; ambient time/randomness is refused.
|
|
133
159
|
|
|
134
160
|
## Choosing what to fork
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
161
|
+
Use the `component-library` projection to choose a definition, inspect its input schema and
|
|
162
|
+
capabilities, then fetch its exact scoped source as described in Path A. Presets and recipes
|
|
163
|
+
are different card kinds: follow their exact definition/document references rather than treating
|
|
164
|
+
those IDs as source IDs. Inspect appropriate previews before judging visual behavior.
|
|
139
165
|
|
|
140
166
|
## Layout inside a component — `FlexLayout` / `solveFlex`
|
|
141
167
|
When a graphic has several cells that must share space — a feature grid, a fixed rail beside
|
|
@@ -172,8 +198,8 @@ const R = params.region ?? { x: 0, y: 0, w: 1, h: 1 };
|
|
|
172
198
|
## Don't
|
|
173
199
|
- Don't expect a forked primitive to use rich named props — read `params` inside and use the explicit
|
|
174
200
|
`assets` and `render` bags for media and frame state.
|
|
175
|
-
-
|
|
176
|
-
|
|
201
|
+
- When a built-in fits the request, fork its exact v3 snapshot using Path A. Never discard its
|
|
202
|
+
definition by copying only its TSX; preserve the definition and manifest too.
|
|
177
203
|
- Don't `create_component` a fresh id each fix iteration — `update_component` (same id) is the loop.
|
|
178
204
|
- Don't update a placed component without its `projectId` in the body — the placed clips keep the
|
|
179
205
|
version they pin, so the next preview or render shows the old graphic.
|
|
@@ -5,6 +5,14 @@ description: Use when an AI agent should DRIVE CueFrame to a high-quality clip i
|
|
|
5
5
|
|
|
6
6
|
# CueFrame — Compose convergence loop
|
|
7
7
|
|
|
8
|
+
## Scope and capability policy
|
|
9
|
+
|
|
10
|
+
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
+
|
|
12
|
+
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
+
|
|
14
|
+
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
15
|
+
|
|
8
16
|
You are the director. CueFrame gives you hands (author), eyes (capture), and a
|
|
9
17
|
judge (verify); you supply the taste and the iteration. The engine does NOT
|
|
10
18
|
auto-compose for you here — you drive the loop and decide when it's done. Drive
|
|
@@ -27,7 +35,7 @@ Hosted preview and scoring are durable, stateless jobs. Keep their job IDs and
|
|
|
27
35
|
wait for each terminal result; there is no hosted render box to open, warm, or close.
|
|
28
36
|
Use the local live-preview tools when working in a desktop project that exposes them.
|
|
29
37
|
|
|
30
|
-
## 0. Context —
|
|
38
|
+
## 0. Context — relevant project and source first
|
|
31
39
|
|
|
32
40
|
`GET /v1/media/:id/context` (`cueframe_api_getMediaContext`) returns what you need
|
|
33
41
|
to author well for a source:
|
|
@@ -40,10 +48,15 @@ to author well for a source:
|
|
|
40
48
|
- **transcript** — utterances with per-word `start`/`end` (seconds). Use for
|
|
41
49
|
caption timing and for placing overlays on the right beat.
|
|
42
50
|
|
|
51
|
+
For a maintained builtin package, follow [exact builtin insertion](references/builtin-insertion.md)
|
|
52
|
+
before authoring custom source.
|
|
53
|
+
|
|
43
54
|
## 1. Author
|
|
44
55
|
|
|
45
56
|
Build/modify the working composition with the op vocabulary —
|
|
46
|
-
`
|
|
57
|
+
the curated `apply_composition({ projectId, body: { ops: [...] } })`. Read
|
|
58
|
+
`describe_composition_ops` for supported operations and `get_composition` for
|
|
59
|
+
current revision and brand witnesses before editing. Op keys
|
|
47
60
|
are `.strict()`: a typo'd key is rejected, not silently dropped, so read the
|
|
48
61
|
error and fix the key. Reference faces from get_context in your reframe segments;
|
|
49
62
|
time captions/overlays from the transcript word timings.
|
|
@@ -61,9 +74,9 @@ and audio timing; use `preview_component` or `preview_card` for isolated authori
|
|
|
61
74
|
|
|
62
75
|
## 3. Score it
|
|
63
76
|
|
|
64
|
-
|
|
77
|
+
When broader review is useful and within budget, use `score_composition`, or `POST /v1/projects/:id/score-composition`, with the
|
|
65
78
|
composition target plus optional `editorialIntent` and `brandContext`. It returns
|
|
66
|
-
`{ jobId }`; call `wait_job({ kind: "verify", jobId })`. CueFrame's judge samples
|
|
79
|
+
`{ jobId }`; call `wait_job({ kind: "verify", id: jobId })`. CueFrame's judge samples
|
|
67
80
|
the meaningful beats, renders them, and returns:
|
|
68
81
|
|
|
69
82
|
```
|
|
@@ -82,6 +95,8 @@ The four criteria:
|
|
|
82
95
|
| **brand** | on-brand color/typography/voice; cohesive look |
|
|
83
96
|
| **caption** | caption legibility, timing, placement (or `no_captions` when absent) |
|
|
84
97
|
|
|
98
|
+
The hosted caption criterion can penalize intentionally uncaptioned work; do not add captions solely for a score. These instructions do not change judge behavior.
|
|
99
|
+
|
|
85
100
|
You get **scores and the critique, never the rubric** — the taste is CueFrame's.
|
|
86
101
|
Pass `editorialIntent` (your brief/hook) so editorial is graded against what you
|
|
87
102
|
meant.
|
|
@@ -98,8 +113,7 @@ nudge pixels (see `cueframe-component-authoring`).
|
|
|
98
113
|
|
|
99
114
|
## 5. Stop — then render
|
|
100
115
|
|
|
101
|
-
For a whole-film review,
|
|
102
|
-
acceptance criteria. Two no-improvement passes are a reason to stop spending and report what
|
|
116
|
+
For a whole-film review, check the brief's actual acceptance criteria; no fixed score threshold applies. Two no-improvement passes are a reason to stop spending and report what
|
|
103
117
|
remains, not to declare a rejected result approved. Render with `create_render` only when a
|
|
104
118
|
finished video is requested or the work reaches final delivery. A scoped revision can end with
|
|
105
119
|
verified preview evidence and an explicit note that no new final export was made.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Discover and insert an exact builtin
|
|
2
|
+
|
|
3
|
+
Use the hosted MCP tools in this order. The CLI reaches the same REST operations
|
|
4
|
+
through `cueframe api ... --json`; read `cueframe describe --json` for its current
|
|
5
|
+
request options. Use the selected environment consistently.
|
|
6
|
+
|
|
7
|
+
1. Call `list_catalog` with `projection: "component-library"`, `origin: "builtin"`,
|
|
8
|
+
`limit: 10` and a search term. Follow the returned cursor for more results.
|
|
9
|
+
2. Preserve the selected card's complete identity, including collection, id and
|
|
10
|
+
revision. Call `resolve_builtin_component` with that exact identity. For a
|
|
11
|
+
preset or recipe, retain the returned `documentSha256` and canonical document.
|
|
12
|
+
A definition is source material, not a whole insertable package.
|
|
13
|
+
3. Read the target with `get_composition`, negotiating component execution 3 and
|
|
14
|
+
dependencies. Keep its revision and brand identity. Do not recreate the project.
|
|
15
|
+
4. Call `apply_template` with `template` equal to the selected builtin id. Put
|
|
16
|
+
projectId, documentSha256, insert, values, media and concurrency witnesses
|
|
17
|
+
inside `body`, following the live tool schema. Use an explicit nonnegative
|
|
18
|
+
`insert.startTime` and a unique `insert.idPrefix`; the package keeps its
|
|
19
|
+
authored placement offsets. Select pinned samples explicitly for every media slot you intend to use:
|
|
20
|
+
`media: { image1: { sample: true }, image2: { sample: true } }` (continue
|
|
21
|
+
for all declared slots), or bind real media IDs. Missing required bindings
|
|
22
|
+
are refused; samples are never selected implicitly.
|
|
23
|
+
5. Read back the composition. Check that existing clips remain, every package
|
|
24
|
+
placement exists at its intended offset, and exact source pins are retained.
|
|
25
|
+
6. Preview the affected interval, then use `create_render` and wait for the actual
|
|
26
|
+
artifact. Inspect the produced video; a successful request alone is not render
|
|
27
|
+
evidence.
|
|
28
|
+
|
|
29
|
+
Never replace a selected revision with the latest, switch its scope, refresh a
|
|
30
|
+
stale concurrency witness silently, synthesize replacement wrapper source, or
|
|
31
|
+
use a thumbnail as the package. A pinned sample failure identifies the slot;
|
|
32
|
+
report it or bind an explicit replacement instead of accepting changed bytes.
|
|
33
|
+
|
|
34
|
+
The executable request examples beside this guide are validated against the
|
|
35
|
+
MCP introspection snapshot generated from the server package.
|
|
36
|
+
|
|
37
|
+
CLI discovery uses the same contract:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
cueframe api GET '/v1/components?projection=component-library&origin=builtin&q=wheel&limit=10' --target dev --json
|
|
41
|
+
cueframe api GET '/v1/components/builtin/resolve?collection=curated-looks&id=builtin%3Areference-component-wheel-full&revision=OBSERVED_REVISION' --target dev --json
|
|
42
|
+
cueframe api POST '/v1/templates/builtin%3Areference-component-wheel-full/apply' --body @insertion.json --target dev --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Replace `OBSERVED_REVISION` with the returned card revision. `insertion.json`
|
|
46
|
+
contains the `body` object from the MCP example with real observed identifiers
|
|
47
|
+
and witnesses. The fixture digest identifies the reviewed Wheel document; use the live resolved
|
|
48
|
+
digest and observed brand identity instead of copying example witnesses. A 202 means pinned media preparation is pending: repeat the same
|
|
49
|
+
insertion command after the response's retry delay, retaining `commandId`.
|