/** * Render a {@link BrandDefinitionArtifact} into the prose `BRAND — …` line the * filmmaking-prompts composer appends to each scene packet (after the * canonical 10-block body and after any DIRECTOR addendum, so it never * disturbs the Seedance block-order contract). * * Pure, deterministic, and intentionally PROSE-ONLY: palette colors render by * their authored names (never hex numerals) so the line passes the prompt-lint * prose-register check; unnamed colors are simply skipped. */ import { BRAND_PALETTE_ROLES, type BrandDefinitionArtifact } from './brand-definition.js'; function clause(label: string, value: string): string { return value.trim() ? `${label}: ${value.trim()}.` : ''; } export function renderBrandLine(brand: BrandDefinitionArtifact): string { const paletteNames = BRAND_PALETTE_ROLES.map((role) => brand.palette[role]?.name ?? '') .filter(Boolean) .join(', '); const parts = [ clause('Wordmark', brand.brandName), clause('Palette', paletteNames), clause('Voice', brand.voice.tone), ].filter(Boolean); return parts.length > 0 ? `BRAND — ${parts.join(' ')}` : ''; }