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

address review: clarify mirror-sync + SHORT-vs-RICH helper scopes in comments

[._.]/ Adam Eivy31a954ee24fd
diff --git a/client/src/lib/canonPrompt.js b/client/src/lib/canonPrompt.js
index 5a8b48378d..614d3621e4 100644
--- a/client/src/lib/canonPrompt.js
+++ b/client/src/lib/canonPrompt.js
@@ -1,6 +1,8 @@
-// Mirror of server/lib/canonPrompt.js — keep byte-for-byte in sync.
-// The server copy is authoritative; tests in server/lib/canonPrompt.test.js
-// are the contract.
+// Mirror of server/lib/canonPrompt.js — logic kept in sync (specs + helpers
+// must match exactly). Header comments differ intentionally (the server copy
+// carries the full JSDoc); when editing, port logic changes verbatim and
+// leave commentary scoped to each side. The server copy is authoritative;
+// tests in server/lib/canonPrompt.test.js are the contract.
const trim = (s) => (typeof s === 'string' ? s.trim() : '');
diff --git a/server/lib/scenePrompt.js b/server/lib/scenePrompt.js
index c7e13c5ae4..f3f6fbc432 100644
--- a/server/lib/scenePrompt.js
+++ b/server/lib/scenePrompt.js
@@ -142,9 +142,12 @@ export function buildScenePrompt(workTitle, scene, matchedCharacters, worldStyle
: '';
const settingMetaFrag = [intExtPart, todPart].filter(Boolean).join(', ');
// Pull descriptor fragments via the shared canon-prompt helper so the
- // setting baseline stays in sync with `KINDS[].descFor` (UI) and
- // `synthesizeCanonPrompt` (canon-render synthesis). Trailing-period on
- // prefixed fragments preserves the pre-extraction "Palette: X." sentence
+ // setting baseline shares the *SHORT* spec subset (description / Palette /
+ // recurringDetails) with `KINDS[].descFor` (UI summary). Note:
+ // `synthesizeCanonPrompt` uses the *RICH* spec — same helper, broader
+ // field set (adds era / weather). Both call sites stay coherent via the
+ // shared helper, but they are not byte-equivalent prompts. Trailing-period
+ // on prefixed fragments preserves the pre-extraction "Palette: X." sentence
// boundary so palette + recurringDetails don't run together when the
// budget-truncation join collapses fragments with a single space.
const baselineFrags = matchedSetting