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
10 changes: 10 additions & 0 deletions docs/guides/media.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ Watch once from beginning to end and check:
- voice clarity on ordinary headphones and laptop speakers;
- missing files, temporary URLs, and late-loading media.

## Reuse an approved recipe

Ask the agent to save an approved video's design and storyboard as a named
recipe for later projects. Saving the same name again creates a new version
and archives the previous project version.

If the new version has no `BRIEF.md`, importing that recipe into another
project does not restore the older brief. The earlier brief remains available
in the archived version.

## Choose a media task

<CardGroup cols={2}>
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/media-use/lib/recipe-store.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export function freezeRecipe({ projectDir, name, workflow, blocks }) {
const userDir = join(userRecipesDir(), slug);
mkdirSync(userDir, { recursive: true });
cpSync(dir, userDir, NON_ASCII_SAFE_DIR_COPY);
if (!briefSkeleton) rmSync(join(userDir, "brief-skeleton.md"), { force: true });
} catch {
// The project-tier freeze already landed.
}
Expand Down
24 changes: 24 additions & 0 deletions packages/cli/src/media-use/lib/recipe-store.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,30 @@ test("re-freezing bumps the version and archives the old folder", () => {
});
});

test("re-freezing without a brief does not import the previous version's brief", () => {
withSandbox(({ project, root }) => {
writeFileSync(join(project, "BRIEF.md"), BRIEF);
freezeRecipe({ projectDir: project, name: "promo" });

rmSync(join(project, "BRIEF.md"));
const frozen = freezeRecipe({
projectDir: project,
name: "promo",
workflow: "product-launch-video",
});
assert.equal(frozen.version, 2);
assert.equal(frozen.briefSkeleton, false);
assert.ok(existsSync(join(project, ".media/recipes/promo@v1/brief-skeleton.md")));

const fresh = join(root, "fresh-project");
mkdirSync(fresh, { recursive: true });
const used = useRecipe({ projectDir: fresh, name: "promo" });
assert.equal(used.recipe.version, 2);
assert.equal(used.briefSkeletonPath, undefined);
assert.ok(!existsSync(join(fresh, ".media/recipes/promo/brief-skeleton.md")));
});
});

test("list merges tiers (project wins), filters by workflow, skips archives", () => {
withSandbox(({ project, root }) => {
freezeRecipe({ projectDir: project, name: "promo", workflow: "product-launch-video" });
Expand Down
2 changes: 1 addition & 1 deletion skills-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"files": 13
},
"media-use": {
"hash": "6550641984b19843",
"hash": "a1e407b34da1e96a",
"files": 116
},
"remotion-to-hyperframes": {
Expand Down
1 change: 1 addition & 0 deletions skills/media-use/scripts/lib/recipe-store.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export function freezeRecipe({ projectDir, name, workflow, blocks }) {
const userDir = join(userRecipesDir(), slug);
mkdirSync(userDir, { recursive: true });
cpSync(dir, userDir, NON_ASCII_SAFE_DIR_COPY);
if (!briefSkeleton) rmSync(join(userDir, "brief-skeleton.md"), { force: true });
} catch {
// The project-tier freeze already landed.
}
Expand Down
Loading