Skip to content

Commit 377384c

Browse files
vanceingallsclaude
andcommitted
fix(skills): address PR #2110 review feedback
- SSOT: the three assemble-index.mjs BGM fallbacks now import bgmDefaultVolume() from media-use's bgm.mjs instead of duplicating the 0.12/0.9 literals (both reviewers). The cross-skill relative import matches the existing dependency (each workflow's audio.mjs adapter already resolves ../../media-use/audio/scripts/audio.mjs). - STATUS_ROLE_KEY: extended with info|neutral|alert|caution|critical — same hue-carries-meaning class as the original set (all 3 copies). - bgm.md: phrase the default as bgmDefaultVolume()/BGM_BED_VOLUME with "currently 0.12" so the prose survives future tuning. - fetch-pr.mjs: drop dead mergeCommit field from the gh pr view FIELDS list (version resolution uses mergedAt only). - music-to-video assemble-index.mjs: comment documenting why its BGM stays at 0.8 under VO — music is the content there, not a narration bed, so the explainer pipelines' 0.12 default deliberately does not apply. Not changed: pickAccent's chroma fallback — both call sites pass keyless capture palettes (tokens.json hex lists), so no status-role keys exist to filter on; the keyed preset path goes through semanticColors and the build-frame remix, which this PR already fixed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b208d06 commit 377384c

10 files changed

Lines changed: 24 additions & 20 deletions

File tree

skills-manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"files": 144
77
},
88
"faceless-explainer": {
9-
"hash": "a8f964f864ee3a14",
9+
"hash": "09bc257e79dabebc",
1010
"files": 18
1111
},
1212
"figma": {
@@ -46,23 +46,23 @@
4646
"files": 10
4747
},
4848
"media-use": {
49-
"hash": "9c539e08b523830c",
49+
"hash": "a4eaa38f1b5942a2",
5050
"files": 114
5151
},
5252
"motion-graphics": {
5353
"hash": "96ed2f7d8051b009",
5454
"files": 23
5555
},
5656
"music-to-video": {
57-
"hash": "901a19d0680f8c1b",
57+
"hash": "5bb405421a7e19ba",
5858
"files": 132
5959
},
6060
"pr-to-video": {
61-
"hash": "da8e3cbebcd4b674",
61+
"hash": "a93fde2b33b26e75",
6262
"files": 22
6363
},
6464
"product-launch-video": {
65-
"hash": "3253ebe1b1a26374",
65+
"hash": "248500d139f278d6",
6666
"files": 20
6767
},
6868
"remotion-to-hyperframes": {

skills/faceless-explainer/scripts/assemble-index.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { parseStoryboard } from "./lib/storyboard.mjs";
5555
import { parseFormat } from "./lib/dimensions.mjs";
5656
import { stageAssets } from "./lib/assets.mjs";
5757
import { parseColors, semanticColors } from "./lib/tokens.mjs";
58+
import { bgmDefaultVolume } from "../../media-use/audio/scripts/lib/bgm.mjs";
5859

5960
// ---------- argv ----------
6061
const argv = process.argv.slice(2);
@@ -388,9 +389,9 @@ if (audio.bgm?.path) {
388389
`bgm is ${cov.dur?.toFixed?.(1) ?? "?"}s (< ${TOTAL}s) and could not be extended (${cov.reason}) — the tail will be silent; install ffmpeg`,
389390
);
390391
}
391-
// An explicit volume from audio_meta always wins. Otherwise BGM under
392-
// narration is a bed (0.12 ≈ -18 dB); a silent film sits it forward at 0.9.
393-
const vol = audio.bgm.volume != null ? audio.bgm.volume : voiceCount > 0 ? 0.12 : 0.9;
392+
// An explicit volume from audio_meta always wins; otherwise the shared
393+
// media-use default (bed ~ -18 dB under narration, forward for a silent film).
394+
const vol = audio.bgm.volume != null ? audio.bgm.volume : bgmDefaultVolume(voiceCount > 0);
394395
body.push(
395396
` <!-- BGM -->`,
396397
` <audio`,

skills/faceless-explainer/scripts/lib/tokens.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const UA_DEFAULT_COLORS = new Set(
5454
// 145) and would otherwise win a pure chroma ranking, painting captions/highlights the error red.
5555
// build-frame.mjs uses this same key set to protect status colors during the preset→brand remix.
5656
export const STATUS_ROLE_KEY =
57-
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down)(?:[-_]|$)/i;
57+
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down|info|neutral|alert|caution|critical)(?:[-_]|$)/i;
5858

5959
// Pick the brand ACCENT — never by raw chroma alone, never a UA-default link color.
6060
// Priority:

skills/media-use/audio/references/bgm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ One music bed per composition, produced by the shared audio engine (`scripts/aud
2929
}
3030
```
3131

32-
`volume` is 0.12 (≈ -18 dB — a bed under the voice) under narration, 0.9 for a silent film (no voice). An explicit `volume` in `audio_meta.json` always overrides this default. `bgm_pending` is `false` — the file is on disk when the engine returns.
32+
`volume` comes from the engine's `bgmDefaultVolume()`: `BGM_BED_VOLUME` (currently `0.12` ≈ -18 dB — a bed under the voice) under narration, `BGM_SILENT_VOLUME` (currently `0.9`) for a silent film (no voice). Tune those constants in `scripts/lib/bgm.mjs`, not call sites. An explicit `volume` in `audio_meta.json` always overrides this default. `bgm_pending` is `false` — the file is on disk when the engine returns.
3333

3434
## Local generation (fallback) — Lyria → MusicGen
3535

skills/music-to-video/scripts/assemble-index.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ for (const m of mounted) {
153153
body.push("");
154154
}
155155

156-
// BGM (track 11) — full duration; duck slightly when VO present
156+
// BGM (track 11) — full duration. Here the music IS the content (music-first
157+
// skill), so it never drops to the explainer pipelines' narration-bed default
158+
// (bgmDefaultVolume() 0.12 ≈ -18 dB): an incidental VO ducks it only slightly.
157159
let bgmEmitted = false;
158160
if (existsSync(join(hyperframesDir, bgmRel))) {
159161
const vol = voiceCount > 0 ? 0.8 : 0.9;

skills/pr-to-video/scripts/assemble-index.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { parseStoryboard } from "./lib/storyboard.mjs";
5555
import { parseFormat } from "./lib/dimensions.mjs";
5656
import { stageAssets } from "./lib/assets.mjs";
5757
import { parseColors, semanticColors } from "./lib/tokens.mjs";
58+
import { bgmDefaultVolume } from "../../media-use/audio/scripts/lib/bgm.mjs";
5859

5960
// ---------- argv ----------
6061
const argv = process.argv.slice(2);
@@ -388,9 +389,9 @@ if (audio.bgm?.path) {
388389
`bgm is ${cov.dur?.toFixed?.(1) ?? "?"}s (< ${TOTAL}s) and could not be extended (${cov.reason}) — the tail will be silent; install ffmpeg`,
389390
);
390391
}
391-
// An explicit volume from audio_meta always wins. Otherwise BGM under
392-
// narration is a bed (0.12 ≈ -18 dB); a silent film sits it forward at 0.9.
393-
const vol = audio.bgm.volume != null ? audio.bgm.volume : voiceCount > 0 ? 0.12 : 0.9;
392+
// An explicit volume from audio_meta always wins; otherwise the shared
393+
// media-use default (bed ~ -18 dB under narration, forward for a silent film).
394+
const vol = audio.bgm.volume != null ? audio.bgm.volume : bgmDefaultVolume(voiceCount > 0);
394395
body.push(
395396
` <!-- BGM -->`,
396397
` <audio`,

skills/pr-to-video/scripts/fetch-pr.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ const FIELDS = [
8686
"mergedBy",
8787
"state",
8888
"mergedAt",
89-
"mergeCommit",
9089
].join(",");
9190

9291
const view = ghTry(["pr", "view", prRef, "--json", FIELDS]);

skills/pr-to-video/scripts/lib/tokens.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const UA_DEFAULT_COLORS = new Set(
5454
// 145) and would otherwise win a pure chroma ranking, painting captions/highlights the error red.
5555
// build-frame.mjs uses this same key set to protect status colors during the preset→brand remix.
5656
export const STATUS_ROLE_KEY =
57-
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down)(?:[-_]|$)/i;
57+
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down|info|neutral|alert|caution|critical)(?:[-_]|$)/i;
5858

5959
// Pick the brand ACCENT — never by raw chroma alone, never a UA-default link color.
6060
// Priority:

skills/product-launch-video/scripts/assemble-index.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { parseStoryboard } from "./lib/storyboard.mjs";
5555
import { parseFormat } from "./lib/dimensions.mjs";
5656
import { stageAssets } from "./lib/assets.mjs";
5757
import { parseColors, semanticColors } from "./lib/tokens.mjs";
58+
import { bgmDefaultVolume } from "../../media-use/audio/scripts/lib/bgm.mjs";
5859

5960
// ---------- argv ----------
6061
const argv = process.argv.slice(2);
@@ -388,9 +389,9 @@ if (audio.bgm?.path) {
388389
`bgm is ${cov.dur?.toFixed?.(1) ?? "?"}s (< ${TOTAL}s) and could not be extended (${cov.reason}) — the tail will be silent; install ffmpeg`,
389390
);
390391
}
391-
// An explicit volume from audio_meta always wins. Otherwise BGM under
392-
// narration is a bed (0.12 ≈ -18 dB); a silent film sits it forward at 0.9.
393-
const vol = audio.bgm.volume != null ? audio.bgm.volume : voiceCount > 0 ? 0.12 : 0.9;
392+
// An explicit volume from audio_meta always wins; otherwise the shared
393+
// media-use default (bed ~ -18 dB under narration, forward for a silent film).
394+
const vol = audio.bgm.volume != null ? audio.bgm.volume : bgmDefaultVolume(voiceCount > 0);
394395
body.push(
395396
` <!-- BGM -->`,
396397
` <audio`,

skills/product-launch-video/scripts/lib/tokens.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const UA_DEFAULT_COLORS = new Set(
5454
// 145) and would otherwise win a pure chroma ranking, painting captions/highlights the error red.
5555
// build-frame.mjs uses this same key set to protect status colors during the preset→brand remix.
5656
export const STATUS_ROLE_KEY =
57-
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down)(?:[-_]|$)/i;
57+
/(?:^|[-_])(?:positive|negative|success|error|warning|danger|good|bad|up|down|info|neutral|alert|caution|critical)(?:[-_]|$)/i;
5858

5959
// Pick the brand ACCENT — never by raw chroma alone, never a UA-default link color.
6060
// Priority:

0 commit comments

Comments
 (0)