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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refactor([cleanplateprompt-migrate-to-rich-canon-fragments]): delegate clean-plate descriptor body to richCanonDescriptorFragments
[._.]/ Adam Eivydbf0ba14e138
diff --git a/client/src/lib/cleanPlatePrompt.js b/client/src/lib/cleanPlatePrompt.jsindex ab546d0e76..5cfb758507 100644--- a/client/src/lib/cleanPlatePrompt.js+++ b/client/src/lib/cleanPlatePrompt.js@@ -9,8 +9,14 @@* prompt that explicitly excludes people.** Output mirrors `composeStyledPrompt`: `{ prompt, negativePrompt }`.+ *+ * Descriptor body delegates to `richCanonDescriptorFragments('place', …)` so+ * `era` / `weather` flow through alongside `description` / `palette` /+ * `recurringDetails` — visual prompts benefit from period/atmosphere cues.*/+import { mapCanonDescriptorFragments, richCanonDescriptorFragments } from './canonPrompt.js';+const CLEAN_PLATE_PREFIX = 'Empty location, no characters, no people, edge-to-edge composition';const CLEAN_PLATE_NEGATIVE = 'people, characters, faces, hands, figures, person';@@ -23,11 +29,10 @@ export function composeCleanPlatePrompt(setting, userNegative = '') {const intExt = setting.intExt === 'INT' ? 'interior' : setting.intExt === 'EXT' ? 'exterior' : '';const tod = typeof setting.timeOfDay === 'string' && setting.timeOfDay ? setting.timeOfDay : '';const meta = [intExt, tod].filter(Boolean).join(', ');- const descParts = [- setting.description?.trim() || '',- setting.palette?.trim() ? `Palette: ${setting.palette.trim()}.` : '',- setting.recurringDetails?.trim() || '',- ].filter(Boolean);+ const descParts = mapCanonDescriptorFragments(+ richCanonDescriptorFragments('place', setting),+ { trailingPeriod: true },+ );const promptSegs = [CLEAN_PLATE_PREFIX,meta ? `(${meta})` : '',diff --git a/client/src/lib/cleanPlatePrompt.test.js b/client/src/lib/cleanPlatePrompt.test.jsindex 15ddd0b2ab..4d3c2b2338 100644--- a/client/src/lib/cleanPlatePrompt.test.js+++ b/client/src/lib/cleanPlatePrompt.test.js@@ -54,4 +54,30 @@ describe('composeCleanPlatePrompt', () => {expect(composeCleanPlatePrompt(null).prompt).toBe(CLEAN_PLATE_PREFIX);expect(composeCleanPlatePrompt('not an object').prompt).toBe(CLEAN_PLATE_PREFIX);});++ it('includes era and weather when present (rich-fragment migration)', () => {+ const out = composeCleanPlatePrompt({+ description: 'a rooftop helipad',+ palette: 'rust, sodium',+ era: '1980s near-future',+ weather: 'acid drizzle',+ recurringDetails: 'cracked landing-pad markings',+ });+ expect(out.prompt).toContain('a rooftop helipad');+ expect(out.prompt).toContain('Palette: rust, sodium');+ expect(out.prompt).toContain('Era: 1980s near-future');+ expect(out.prompt).toContain('Weather: acid drizzle');+ expect(out.prompt).toContain('cracked landing-pad markings');+ });++ it('omits era / weather when blank without leaving dangling separators', () => {+ const out = composeCleanPlatePrompt({+ description: 'a rooftop helipad',+ era: '',+ weather: ' ',+ });+ expect(out.prompt).not.toContain('Era:');+ expect(out.prompt).not.toContain('Weather:');+ expect(out.prompt).toContain('a rooftop helipad');+ });});