Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Keep the Suno style parser private to the creative context

Claudee490491471cb
diff --git a/server/lib/README.md b/server/lib/README.md
index 0fb4271b77..91258b9d4c 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -832,7 +832,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| `databaseWriterRegistry.js` | `createDatabaseWriterRegistry(dataDir?)` supplies durable detached launch reservations and inventory observations (reservation, POSIX launcher group, job PID, abandonment, completion) plus `retire(id, archiveDir?)` for proven-quiescent records; `reserveDatabaseWriter` is the mandatory `spawnDetached` admission boundary. `classifyWriterQuiescence(row, processes)` classifies a row against a process-table snapshot (quiescent / running / orphaned / pending / ambiguous) without probing PIDs. Legacy compacted history and Windows completions stay unresolved. |
-| `musicVideoCreativeContext.js` | `musicVideoDirectionContext(direction)` bounds the authoritative Cast & Sets bible; `musicVideoCodeDirectionContext(direction)` renders the approved procedural direction (rules + reusable character definitions) for code-authoring requests; `musicVideoCreativeContext(concept)` composes the selected universe style and authored cast/place/object bible for planning and generation; `parseSongStyle(text)` splits a Suno style prompt into `{ sound, avoid }` (minus-prefixed excluded styles) and `musicVideoSongStyleContext(concept)` turns `concept.songStyle` into design direction for the planning LLMs (never an image prompt). |
+| `musicVideoCreativeContext.js` | `musicVideoDirectionContext(direction)` bounds the authoritative Cast & Sets bible; `musicVideoCodeDirectionContext(direction)` renders the approved procedural direction (rules + reusable character definitions) for code-authoring requests; `musicVideoCreativeContext(concept)` composes the selected universe style and authored cast/place/object bible for planning and generation; `musicVideoSongStyleContext(concept)` splits `concept.songStyle` (a Suno style prompt; minus-prefixed terms are excluded styles) and turns it into design direction for the planning LLMs (never an image prompt). |
| `musicVideoCharacterStyles.js` | Built-in Music Video character styles (a fixed-identity performer a project loads as its base concept and cast): `MUSIC_VIDEO_CHARACTER_STYLES` / `_IDS`, `getMusicVideoCharacterStyle`, `summarizeMusicVideoCharacterStyle` (picker projection), `musicVideoCharacterStyleSnapshot` (the `concept.characterStyle` text), `musicVideoCharacterStyleSubject` / `…SubjectId` / `…ReferenceId` (the protagonist and character-sheet reference a pick adds), `musicVideoCharacterSheetPrompt` (renders the style's own sheet). Pure; `services/musicVideo/characterStyles.js` keeps each install's sheet image. |
| `moodBoardStyleContext.js` | `collectBoardStyleContext(board)` bounds a board's notes, captions, analyzed prompts, and composite style for creative prompts. `moodBoardImageCandidates(board, resolveItem)` lists the poster first, then pinned local images. |
| `musicVideoAutonomous.js` | Fully-autonomous Music Video vocabulary: `AUTONOMOUS_STAGES` (brief → lyrics → style → song → analyze → produce), optional `AUTONOMOUS_CHECKPOINT_IDS`, `normalizeAutonomousSettings` / `normalizeAutonomousBrief` / `normalizeAutopilotParams` (the shared run settings, a run's stored brief, and the scheduled task's params), `autonomousMedium` / `autonomousPool` (tool picks → footage vs code, production route pool), `sunoSongFields` + Suno limits/URL helpers, `normalizeSunoOptions` (the brief's optional `suno` form options: exclude styles, vocal gender, model version), and `pickBrainIdea` / `ideaToPrompt` for the scheduled task. Pure; the client drawer and the run service import it. |
diff --git a/server/lib/musicVideoCreativeContext.js b/server/lib/musicVideoCreativeContext.js
index fd3c3e9729..c9a17155ef 100644
--- a/server/lib/musicVideoCreativeContext.js
+++ b/server/lib/musicVideoCreativeContext.js
@@ -48,7 +48,7 @@ const EXCLUDED_STYLE = /^[-\u2010\u2011\u2012\u2013\u2212]\s*/;
* Split a Suno style prompt into what the song sounds like and the styles it
* excludes (`-bubblegum pop`). Terms are comma separated; '' and [] when unset.
*/
-export function parseSongStyle(text) {
+function parseSongStyle(text) {
const terms = String(text || '').split(',').map((t) => t.trim()).filter(Boolean);
const sound = terms.filter((t) => !EXCLUDED_STYLE.test(t));
const avoid = terms.filter((t) => EXCLUDED_STYLE.test(t)).map((t) => t.replace(EXCLUDED_STYLE, '').trim()).filter(Boolean);