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 writing-stage styleNotes out of image prompts

[._.]/ Adam Eivy71907647f0b9
diff --git a/client/src/components/fableloom/sceneMediaRequests.js b/client/src/components/fableloom/sceneMediaRequests.js
index 2466857f5a..45e7cb3fde 100644
--- a/client/src/components/fableloom/sceneMediaRequests.js
+++ b/client/src/components/fableloom/sceneMediaRequests.js
@@ -8,6 +8,14 @@
* The server-side visual-canon compiler owns reference allocation and graph
* continuity. These builders send authored intent plus the destination tag;
* they never pre-flatten canon into an untyped browser reference list.
+ *
+ * The preset is applied here as well as server-side on purpose: an unlinked
+ * loom (no universe reachable from the loom or its series) gets no compiled
+ * request back, and the browser preset is the only style it would ever see.
+ * The compiler drops style tokens the authored prompt already carries
+ * (`dropTokensPresentIn` in server/lib/universeVisualStyle.js), so the linked
+ * path does not emit the token list twice — do not fix the overlap by
+ * deleting either side.
*/
import { composeStyledPrompt } from '../../lib/composeStyledPrompt';
diff --git a/server/lib/README.md b/server/lib/README.md
index 94726180fa..2705ee7b2d 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -127,6 +127,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| `universeBibleCompleteness.js` | Is a universe bible entry actually described? The shared per-kind expand-field vocabulary (`BIBLE_EXPAND_FIELDS`, `BIBLE_CORE_FIELDS`) and the `core`/`full` completeness predicates the quota-burn describe job scans with. Pure. |
| `universeMarkdown.js` | Pure deterministic Universe Builder world-bible export: `universeToMarkdown(record)` plus safe Markdown download filename helpers. |
| `universePromptRenderers.js` | Renderers that turn a universe's `categories` map + canon into prompt context. |
+| `universeVisualStyle.js` | The style a universe contributes to an IMAGE prompt: `buildVisualStyleClause(universe, {override, mode})` (curated `influences.embrace` tokens + a series `stylePromptOverride`, NEVER the free-text `styleNotes`, which is writing-stage direction), `universeAestheticLine` (the labeled variant canon sheet/LoRA renders lead with), `universeVisualStyleTokens`, `splitPromptTokens`, `dropTokensPresentIn` (drop style the browser already composed into the authored prompt) and `mergeNegativePromptTokens` (token-level union of comma-joined negatives). |
| `writersRoomPresets.js` | Writers Room enums (WORK_KINDS, WORK_STATUSES, ANALYSIS_KINDS). |
| `writersRoomStylePresets.js` | Curated style presets for storyboards + universe. |
diff --git a/server/lib/index.js b/server/lib/index.js
index eec6f2d000..a82feda881 100644
--- a/server/lib/index.js
+++ b/server/lib/index.js
@@ -111,6 +111,7 @@ export * as storyBible from './storyBible.js';
export * from './universeBibleCompleteness.js';
export * from './universeMarkdown.js';
export * from './universePromptRenderers.js';
+export * from './universeVisualStyle.js';
export * from './writersRoomPresets.js';
export * from './writersRoomStylePresets.js';
diff --git a/server/lib/universeVisualStyle.js b/server/lib/universeVisualStyle.js
new file mode 100644
index 0000000000..2cbcc58460
--- /dev/null
+++ b/server/lib/universeVisualStyle.js
@@ -0,0 +1,106 @@
+/**
+ * The one definition of the style a universe contributes to an IMAGE prompt.
+ *
+ * A universe carries two different style surfaces and they are NOT
+ * interchangeable:
+ *
+ * - `influences.embrace` / `influences.avoid` — curated, comma-joined visual
+ * tokens authored in the Universe Builder's chip inputs specifically so a
+ * diffusion/image model can consume them directly.
+ * - `styleNotes` — free-text direction written for the WRITING stages: tone,
+ * staging, pacing, what a culture's scenes must establish. It routinely
+ * names canon entities that are nowhere near the current shot ("Stage
+ * <character> as a massive but local physical presence…") and craft notes an
+ * image model cannot act on ("keep translation slow, funny, imperfect").
+ * Injected into a render it burns prompt budget and drags unrelated canon
+ * into the frame, so it never enters an image prompt.
+ *
+ * The pipeline's visual stages already worked this way; this module makes the
+ * rule shared so the FableLoom compiler, character reference/blueprint sheets
+ * and LoRA dataset renders can't drift back to the free-text field.
+ *
+ * `universeCanon.js#buildStyleClause` is the sibling for LLM TEXT prompts —
+ * there `styleNotes` is exactly the right context and stays included.
+ */
+
+const tokenList = (values) => (Array.isArray(values) ? values : [])
+ .map((token) => (typeof token === 'string' ? token.trim() : ''))
+ .filter(Boolean);
+
+const normalize = (token) => token.toLowerCase().replace(/\s+/g, ' ');
+
+/** Split a comma-joined prompt/negative string back into trimmed tokens. */
+export const splitPromptTokens = (text) => (typeof text === 'string' ? text : '')
+ .split(',').map((token) => token.trim()).filter(Boolean);
+
+/** Curated visual token lists for a universe (`[]` for a missing universe). */
+export function universeVisualStyleTokens(universe) {
+ return {
+ embrace: tokenList(universe?.influences?.embrace),
+ avoid: tokenList(universe?.influences?.avoid),
+ };
+}
+
+/**
+ * Positive style clause for an image prompt.
+ *
+ * `override` / `mode` mirror `series.stylePromptOverride` +
+ * `stylePromptOverrideMode` ('prepend' | 'append' | 'override') so a series can
+ * lead, trail, or replace the universe's tokens — the same composition the
+ * client's `universeStylePreset` applies.
+ */
+export function buildVisualStyleClause(universe, { override = '', mode = 'prepend' } = {}) {
+ const trimmedOverride = typeof override === 'string' ? override.trim() : '';
+ const embrace = trimmedOverride && mode === 'override'
+ ? ''
+ : universeVisualStyleTokens(universe).embrace.join(', ');
+ const parts = mode === 'append' ? [embrace, trimmedOverride] : [trimmedOverride, embrace];
+ return parts.filter(Boolean).join('. ');
+}
+
+/**
+ * Drop style tokens the authored prompt already carries.
+ *
+ * The browser composes the same universe preset onto a scene prompt before
+ * POSTing it, and the server-side compiler then prepends the canonical style
+ * clause. Without a token-level pass the entire embrace list lands twice in
+ * every render prompt (and the avoid list twice in every negative), which is
+ * pure budget with no effect on the image.
+ */
+export function dropTokensPresentIn(tokens, authoredText) {
+ const haystack = normalize(typeof authoredText === 'string' ? authoredText : '');
+ if (!haystack) return tokenList(tokens);
+ return tokenList(tokens).filter((token) => !haystack.includes(normalize(token)));
+}
+
+/**
+ * Union several comma-joined negative-prompt sources, deduped at TOKEN level.
+ *
+ * A plain `unique()` over the sources compares whole strings, so an authored
+ * negative that is itself a joined token list never matches the individual
+ * universe tokens and the whole list repeats.
+ */
+export function mergeNegativePromptTokens(sources) {
+ const seen = new Set();
+ const merged = [];
+ for (const source of Array.isArray(sources) ? sources : []) {
+ const tokens = Array.isArray(source) ? tokenList(source) : splitPromptTokens(source);
+ for (const token of tokens) {
+ const key = normalize(token);
+ if (seen.has(key)) continue;
+ seen.add(key);
+ merged.push(token);
+ }
+ }
+ return merged;
+}
+
+/**
+ * The labeled aesthetic line the canon render prompts (character reference and
+ * blueprint sheets, LoRA dataset images) have always led with. `''` when the
+ * universe has no curated tokens, so callers keep their own fallback line.
+ */
+export function universeAestheticLine(universe, options) {
+ const clause = buildVisualStyleClause(universe, options);
+ return clause ? `Universe aesthetic: ${clause}` : '';
+}
diff --git a/server/lib/universeVisualStyle.test.js b/server/lib/universeVisualStyle.test.js
new file mode 100644
index 0000000000..b1ca052c9c
--- /dev/null
+++ b/server/lib/universeVisualStyle.test.js
@@ -0,0 +1,53 @@
+import { describe, expect, it } from 'vitest';
+import {
+ buildVisualStyleClause,
+ dropTokensPresentIn,
+ mergeNegativePromptTokens,
+ universeAestheticLine,
+ universeVisualStyleTokens,
+} from './universeVisualStyle.js';
+
+const universe = {
+ influences: { embrace: ['ligne claire', 'flat matte color fields'], avoid: ['photoreal', 'gore'] },
+ // Writing-stage direction: names canon that is nowhere near a given shot.
+ styleNotes: 'Stage Aruun as a massive but local physical presence. Keep the tone PG-13.',
+};
+
+describe('universeVisualStyle', () => {
+ it('keeps the free-text styleNotes out of an image prompt', () => {
+ const clause = buildVisualStyleClause(universe);
+ expect(clause).toBe('ligne claire, flat matte color fields');
+ expect(clause).not.toContain('Aruun');
+ expect(universeAestheticLine(universe)).toBe('Universe aesthetic: ligne claire, flat matte color fields');
+ });
+
+ it('returns empty for a universe with no curated tokens so callers keep their fallback line', () => {
+ expect(buildVisualStyleClause({ styleNotes: 'painted realism' })).toBe('');
+ expect(universeAestheticLine(null)).toBe('');
+ expect(universeVisualStyleTokens(null)).toEqual({ embrace: [], avoid: [] });
+ });
+
+ it('composes a series override by mode', () => {
+ const override = { override: 'washed sepia' };
+ expect(buildVisualStyleClause(universe, override))
+ .toBe('washed sepia. ligne claire, flat matte color fields');
+ expect(buildVisualStyleClause(universe, { ...override, mode: 'append' }))
+ .toBe('ligne claire, flat matte color fields. washed sepia');
+ expect(buildVisualStyleClause(universe, { ...override, mode: 'override' })).toBe('washed sepia');
+ });
+
+ it('drops style tokens the authored prompt already carries', () => {
+ const authored = 'Ligne Claire, flat matte color fields. Tala kneels in silver grass.';
+ expect(dropTokensPresentIn(universeVisualStyleTokens(universe).embrace, authored)).toEqual([]);
+ expect(dropTokensPresentIn(['ligne claire', 'screenprint grain'], authored)).toEqual(['screenprint grain']);
+ expect(dropTokensPresentIn(['ligne claire'], '')).toEqual(['ligne claire']);
+ });
+
+ it('unions negatives at token level so a joined authored negative does not repeat the list', () => {
+ expect(mergeNegativePromptTokens([
+ 'photoreal, gore, blurry',
+ ['photoreal', 'gore'],
+ ['wrong face'],
+ ])).toEqual(['photoreal', 'gore', 'blurry', 'wrong face']);
+ });
+});
diff --git a/server/services/fableLoom/visualConditioning.js b/server/services/fableLoom/visualConditioning.js
index 07eba1b334..c21d70c721 100644
--- a/server/services/fableLoom/visualConditioning.js
+++ b/server/services/fableLoom/visualConditioning.js
@@ -16,6 +16,10 @@ import {
matchCharactersInText, matchObjectsInText, matchPlacesInText,
} from '../../lib/scenePrompt.js';
import { resolveFableLoomProtagonistPresence } from '../../lib/fableLoomPlayback.js';
+import {
+ buildVisualStyleClause, dropTokensPresentIn, mergeNegativePromptTokens, splitPromptTokens,
+ universeVisualStyleTokens,
+} from '../../lib/universeVisualStyle.js';
import { getUniverse } from '../universeBuilder.js';
import { resolveCharacterLoras } from '../characterLoraResolver.js';
import { getSeries } from '../pipeline/series.js';
@@ -345,26 +349,31 @@ export async function compileFableLoomVisualRequest({
const objectPrompts = bindings.boundObjects.map((object) => compact([
`Object: ${object.name}`, object.description, object.significance,
]).join('. '));
- const universeStyle = compact([
- universe.influences?.embrace?.length && universe.influences.embrace.join(', '),
- universe.styleNotes,
- ]);
+ // Curated visual tokens only — `universe.styleNotes` is writing-stage
+ // direction (see lib/universeVisualStyle.js). The browser composes this same
+ // preset onto the scene prompt before POSTing, so drop whatever it already
+ // sent rather than emitting the token list a second time.
+ const universeStyle = dropTokensPresentIn(
+ splitPromptTokens(buildVisualStyleClause(universe)),
+ authoredPrompt,
+ );
const protagonistFraming = bindings.protagonistPresence === 'offscreen'
? 'Framing constraint: the canonical protagonist is speaking through the communicator off-screen. The camera is the remote witness: show the obstacle or environment the protagonist cannot see around a corner, beyond a bend, at a distance, or otherwise outside their sightline. The communicator stays on the protagonist\'s person and completely out of frame; never use a standalone comms device as the subject. Do not show their face, body, silhouette, or duplicate presence in this storyboard image.'
: '';
const positive = compact([
- universeStyle.length && `Universe style: ${universeStyle.join('. ')}`,
+ universeStyle.length && `Universe style: ${universeStyle.join(', ')}`,
placePrompt, ...characterPrompts, ...objectPrompts,
protagonistFraming,
authoredPrompt || (kind === 'video' ? node.videoPrompt || node.prose : node.imagePrompt),
node.visualCanon?.shotNotes && `Shot continuity: ${node.visualCanon.shotNotes}`,
]).join('\n\n').slice(0, 8000);
const identityAvoid = bindings.boundCharacters.flatMap(({ character }) => character.identityPack?.avoid || []);
- const negativePrompt = unique(compact([
+ const negativePrompt = mergeNegativePromptTokens([
authoredNegativePrompt,
- bindings.protagonistPresence === 'offscreen' && 'visible canonical protagonist, protagonist face, protagonist body, protagonist silhouette, standalone communicator, comms device close-up, radio prop hero shot',
- ...(universe.influences?.avoid || []), ...identityAvoid,
- ])).join(', ').slice(0, 8000);
+ bindings.protagonistPresence === 'offscreen' ? 'visible canonical protagonist, protagonist face, protagonist body, protagonist silhouette, standalone communicator, comms device close-up, radio prop hero shot' : '',
+ universeVisualStyleTokens(universe).avoid,
+ identityAvoid,
+ ]).join(', ').slice(0, 8000);
const manifest = {
version: 1,
compilerVersion: FABLELOOM_VISUAL_COMPILER_VERSION,
diff --git a/server/services/fableLoom/visualConditioning.test.js b/server/services/fableLoom/visualConditioning.test.js
index 03dc4f1881..ebb9248556 100644
--- a/server/services/fableLoom/visualConditioning.test.js
+++ b/server/services/fableLoom/visualConditioning.test.js
@@ -17,7 +17,10 @@ const identityPack = (prefix) => ({
const universe = {
id: 'universe-1',
- styleNotes: 'painted cinematic realism',
+ // Free-text direction authored for the WRITING stages: it names canon that
+ // is nowhere near a given shot, so it must never reach a render prompt.
+ styleNotes: 'Stage Aruun as a massive but local physical presence. Keep the tone PG-13.',
+ influences: { embrace: ['ligne claire', 'flat matte color fields'], avoid: ['photoreal', 'gore'] },
characters: [{
id: 'char-a', name: 'Aria', physicalDescription: 'silver braid',
imageRefs: ['aria-neutral.png', 'aria-profile.png', 'aria-body.png'],
@@ -95,6 +98,41 @@ describe('FableLoom visual conditioning compiler', () => {
expect(JSON.stringify(result.visualConditioning)).not.toContain('/approved/');
});
+ it('renders curated style tokens once and never the writing-stage styleNotes', async () => {
+ const loom = loomWith(lockedBinding);
+ const result = await compileFableLoomVisualRequest({
+ tag: { loomId: loom.id, episodeId: 'episode-1', nodeId: 'shot' },
+ kind: 'image',
+ capability: fableLoomImageCapabilities({ mode: 'codex', model: { id: 'gpt-image' }, inputBudget: 4 }),
+ // What the browser actually POSTs: it composes the same universe preset
+ // onto the scene prompt before the compiler ever sees it.
+ authoredPrompt: 'ligne claire, flat matte color fields. A cautious arrival',
+ authoredNegativePrompt: 'photoreal, gore',
+ ...deps(loom),
+ });
+
+ expect(result.prompt).not.toContain('Aruun');
+ expect(result.prompt).not.toContain('PG-13');
+ expect(result.prompt).not.toContain('Universe style:');
+ expect(result.prompt.match(/ligne claire/g)).toHaveLength(1);
+ expect(result.negativePrompt.match(/photoreal/g)).toHaveLength(1);
+ expect(result.negativePrompt.match(/gore/g)).toHaveLength(1);
+ });
+
+ it('still contributes the curated style tokens a render prompt has not already named', async () => {
+ const loom = loomWith(lockedBinding);
+ const result = await compileFableLoomVisualRequest({
+ tag: { loomId: loom.id, episodeId: 'episode-1', nodeId: 'shot' },
+ kind: 'image',
+ capability: fableLoomImageCapabilities({ mode: 'codex', model: { id: 'gpt-image' }, inputBudget: 4 }),
+ authoredPrompt: 'A cautious arrival',
+ ...deps(loom),
+ });
+
+ expect(result.prompt).toContain('Universe style: ligne claire, flat matte color fields');
+ expect(result.negativePrompt).toContain('photoreal');
+ });
+
it('injects the loom canonical protagonist and locked wardrobe into an on-screen canon shot', async () => {
const loom = loomWith({ ...lockedBinding, characterAppearances: [] });
loom.protagonistCharacterId = 'char-a';
diff --git a/server/services/loraDatasetGenerate.js b/server/services/loraDatasetGenerate.js
index 85dc2fb1d6..b3587d1112 100644
--- a/server/services/loraDatasetGenerate.js
+++ b/server/services/loraDatasetGenerate.js
@@ -28,7 +28,7 @@ import { describeImageDataUrlDetailed } from './visionTest.js';
import { resolveCaptionModel, withCaptionVisionLock } from './loraDatasetCaption.js';
import { getSettings } from './settings.js';
import { getUniverse } from './universeBuilder.js';
-import { buildStyleClause } from './universeCanon.js';
+import { universeAestheticLine } from '../lib/universeVisualStyle.js';
import {
extractCharacterPromptCommon,
resolveSheetModelId,
@@ -130,8 +130,7 @@ export function extractSubjectSignaturePhrases(subject, entryKind = 'characters'
*/
export function buildDatasetImagePrompt(universe, subject, variation = {}, entryKind = 'characters') {
const kind = normalizeEntryKind(entryKind);
- const styleClause = buildStyleClause(universe || {});
- const styleBits = styleClause.startsWith('(none provided') ? '' : styleClause;
+ const styleBits = universeAestheticLine(universe);
if (kind !== 'characters') {
const name = trim(subject?.name || subject?.slugline) || 'Unnamed';
const description = flattenValue(subject?.description || subject?.prompt);
diff --git a/server/services/pipeline/visualStageHelpers.js b/server/services/pipeline/visualStageHelpers.js
index 318bd99daa..4bb0ebdf0d 100644
--- a/server/services/pipeline/visualStageHelpers.js
+++ b/server/services/pipeline/visualStageHelpers.js
@@ -13,10 +13,11 @@ import { getSettings } from '../settings.js';
import { getSeries, STYLE_PROMPT_OVERRIDE_MODE_DEFAULT } from './series.js';
import { getIssue } from './issues.js';
import { resolveGalleryImage } from '../../lib/fileUtils.js';
-import { getUniverse, joinInfluenceList } from '../universeBuilder.js';
+import { getUniverse } from '../universeBuilder.js';
import { ServerError } from '../../lib/errorHandler.js';
import { buildScenePrompt, buildPlaceByKey, matchScenePlace } from '../../lib/scenePrompt.js';
import { composeStyledPrompt } from '../../lib/composeStyledPrompt.js';
+import { buildVisualStyleClause, mergeNegativePromptTokens } from '../../lib/universeVisualStyle.js';
import { getImageModels } from '../../lib/mediaModels.js';
import { loraCompatKey } from '../../lib/runners.js';
import { resolveCharacterLoras } from '../characterLoraResolver.js';
@@ -29,24 +30,16 @@ import { resolveImageCleaners } from '../imageGen/index.js';
const joinStyleParts = (...parts) =>
parts.map((s) => (s || '').trim()).filter(Boolean).join(', ');
-const joinStyleSentences = (...parts) =>
- parts.map((s) => (s || '').trim()).filter(Boolean).join('. ');
-
const stackStyle = (series, extraStyle) => joinStyleParts(series?.styleNotes, extraStyle);
// Composes `series.stylePromptOverride` against the universe's embrace
// influences. The mode (prepend/append/override) is documented next to the
// `STYLE_PROMPT_OVERRIDE_MODES` constant in series.js — it's the single
// source of truth.
-const buildStyleClause = (world, series) => {
- const override = (series?.stylePromptOverride || '').trim();
- const mode = series?.stylePromptOverrideMode || STYLE_PROMPT_OVERRIDE_MODE_DEFAULT;
- if (override && mode === 'override') return override;
- const universeStyle = joinInfluenceList(world?.influences?.embrace);
- return mode === 'append'
- ? joinStyleSentences(universeStyle, override)
- : joinStyleSentences(override, universeStyle);
-};
+const buildStyleClause = (world, series) => buildVisualStyleClause(world, {
+ override: series?.stylePromptOverride,
+ mode: series?.stylePromptOverrideMode || STYLE_PROMPT_OVERRIDE_MODE_DEFAULT,
+});
const applyWorldStyle = (prompt, world, series = null) => {
const stylePrompt = buildStyleClause(world, series);
@@ -241,11 +234,10 @@ const enqueueImageJob = ({ prompt, world, settings, options, mode, owner, logLin
// negative handling so the world's global negative-prompt terms stay in
// effect even when the caller supplies their own additions. Deduplicated
// by token so a user repeating a world negative doesn't double-weight it.
- const userNeg = (options.negativePrompt || '').trim();
- const worldNeg = joinInfluenceList(world?.influences?.avoid);
- const negativeTokens = [userNeg, worldNeg]
- .flatMap((s) => s.split(',').map((t) => t.trim()).filter(Boolean));
- const negativePrompt = [...new Set(negativeTokens)].join(', ') || undefined;
+ const negativePrompt = mergeNegativePromptTokens([
+ options.negativePrompt,
+ world?.influences?.avoid,
+ ]).join(', ') || undefined;
const baseParams = {
prompt,
negativePrompt,
diff --git a/server/services/universeCanon.js b/server/services/universeCanon.js
index 1a53df6efc..0dfde54239 100644
--- a/server/services/universeCanon.js
+++ b/server/services/universeCanon.js
@@ -42,6 +42,13 @@ const targetForPrompt = (entry) => ({
firstAppearance: entry.firstAppearance || null,
});
+/**
+ * Style context for an LLM TEXT prompt (canon refine / differentiate / expand).
+ * Free-text `styleNotes` belongs here — it is authored for the writing stages.
+ *
+ * IMAGE prompts must NOT use this: see `lib/universeVisualStyle.js`, which
+ * emits the curated `influences.embrace` tokens only.
+ */
export const buildStyleClause = (universe) => {
const embraceTokens = joinInfluenceList(universe.influences?.embrace);
const bits = [
diff --git a/server/services/universeCharacterSheet.js b/server/services/universeCharacterSheet.js
index 615c471d9d..f729fb9467 100644
--- a/server/services/universeCharacterSheet.js
+++ b/server/services/universeCharacterSheet.js
@@ -19,7 +19,8 @@ import { PATHS, ensureDir, shortId, assertSafeFilename } from '../lib/fileUtils.
import { ServerError } from '../lib/errorHandler.js';
import { getSettings } from './settings.js';
import { getUniverse, updateUniverse } from './universeBuilder.js';
-import { buildStyleClause, purgeReferenceSheetFromAllUniverses } from './universeCanon.js';
+import { purgeReferenceSheetFromAllUniverses } from './universeCanon.js';
+import { universeAestheticLine } from '../lib/universeVisualStyle.js';
import { getImageModels } from '../lib/mediaModels.js';
import { enqueueJob, mediaJobEvents } from './mediaJobQueue/index.js';
import { buildUniverseRunTag } from './universeRunTag.js';
@@ -132,8 +133,7 @@ export function buildCharacterReferenceSheetPrompt(universe, character) {
});
}
- const styleClause = buildStyleClause(universe);
- const styleBits = styleClause.startsWith('(none provided') ? '' : styleClause;
+ const styleBits = universeAestheticLine(universe);
const {
name, aliases, role, pronouns, age, personality, speechAccent, speechPattern,
@@ -235,8 +235,7 @@ export function buildCharacterBlueprintSheetPrompt(universe, character) {
});
}
- const styleClause = buildStyleClause(universe);
- const styleBits = styleClause.startsWith('(none provided') ? '' : styleClause;
+ const styleBits = universeAestheticLine(universe);
const {
name, role, physical, silhouette, special, visualNotes,
diff --git a/server/services/universeCharacterSheet.test.js b/server/services/universeCharacterSheet.test.js
index 64806562c8..8c431d4b38 100644
--- a/server/services/universeCharacterSheet.test.js
+++ b/server/services/universeCharacterSheet.test.js
@@ -5,7 +5,8 @@ const baseUniverse = {
id: 'u-123',
name: 'Test Universe',
influences: { embrace: ['neo-noir', 'coastal rain'] },
- styleNotes: 'painterly, ink-heavy, saturated cool palette',
+ // Writing-stage direction — must NOT reach a render prompt.
+ styleNotes: 'Stage the Signal Runner as a local presence; keep the tone PG-13.',
};
const richCharacter = {
@@ -57,10 +58,11 @@ describe('universeCharacterSheet — buildCharacterReferenceSheetPrompt', () =>
expect(out.prompt).toContain('Vale');
expect(out.prompt).toContain('Signal Runner');
expect(out.prompt).toContain('she/her');
- // Universe style tokens flow into the preamble.
+ // Curated visual tokens flow into the preamble; the free-text styleNotes
+ // (writing-stage direction) does not — see lib/universeVisualStyle.js.
expect(out.prompt).toContain('neo-noir');
expect(out.prompt).toContain('coastal rain');
- expect(out.prompt).toContain('painterly');
+ expect(out.prompt).not.toContain('PG-13');
// Every named zone appears in the prompt.
expect(out.prompt).toMatch(/FRONT view.*3\/4 view.*SIDE view.*BACK view/s);
expect(out.prompt).toMatch(/Color palette zone/);