From de6d7ca92bd6ab3ff51c80ab11ddbaf8b6ead388 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Fri, 18 Sep 2026 20:49:11 -0400 Subject: [PATCH 01/11] docs(skills): an agent adds media with the duration Studio gives a dropped file --- scripts/creator-editing-recipes.test.mjs | 17 +++++++ .../references/creator-editing-recipes.md | 51 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/scripts/creator-editing-recipes.test.mjs b/scripts/creator-editing-recipes.test.mjs index 5d00b4423c..5dcc5c2623 100644 --- a/scripts/creator-editing-recipes.test.mjs +++ b/scripts/creator-editing-recipes.test.mjs @@ -73,3 +73,20 @@ test("the Studio skill's safe boxes equal the preview's", async () => { assert.match(skill, new RegExp(`Action-safe\\s*\\|\\s*${action}%`)); assert.match(skill, new RegExp(`Title-safe\\s*\\|\\s*${title}%`)); }); + +test("the add-media recipe matches Studio's own drop defaults", async () => { + const helpers = await read("packages/studio/src/utils/studioHelpers.ts"); + const defaults = helpers.match(/DEFAULT_TIMELINE_ASSET_DURATION[^=]*=\s*\{([^}]*)\}/)?.[1] ?? ""; + const secs = (kind) => defaults.match(new RegExp(`${kind}:\\s*(\\d+)`))?.[1]; + const section = (await read(OWNER)).split("## Add media")[1]?.split("\n## ")[0] ?? ""; + assert.ok(secs("image"), "could not read Studio's image default"); + assert.match(section, new RegExp(`Image: \`data-duration="${secs("image")}"\``)); + assert.match(section, new RegExp(`\`${secs("video")}\` only when the length cannot be read`)); + const image = section.match(//)?.[0] ?? ""; + assert.match(image, new RegExp(`data-duration="${secs("image")}"`)); + const drop = await read("packages/studio/src/utils/timelineAssetDrop.ts"); + for (const attr of ["class=\"clip\"", "data-start", "data-duration", "data-track-index"]) { + assert.ok(drop.includes(attr), `Studio no longer writes ${attr}`); + assert.ok(image.includes(attr.split("=")[0]), `doc example lacks ${attr}`); + } +}); diff --git a/skills/hyperframes-core/references/creator-editing-recipes.md b/skills/hyperframes-core/references/creator-editing-recipes.md index 74932476a5..67140c1714 100644 --- a/skills/hyperframes-core/references/creator-editing-recipes.md +++ b/skills/hyperframes-core/references/creator-editing-recipes.md @@ -417,6 +417,57 @@ Timeline math: an audio element in the root composition has `data-start` in abso Timeline math: pick the clips first and say which ones you picked (by id) if the request does not match the file exactly; then add one `delta` to every member's `data-start`, so relative spacing is preserved (here `delta = 40`). Give each copy a new unique `id` and the next unused `data-track-index`; keep `src`, `data-duration`, `data-media-start`, `data-volume` and any `data-automation` as they are. Leave the originals untouched. Check the copies still end inside the composition's duration. Owner: `/hyperframes-core`. Limit: copies of a `