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 (codex): embed physicalDescription + personality so character content created via the New form is searchable

[._.]/ Adam Eivy241d8f325689
diff --git a/server/services/embeddings.js b/server/services/embeddings.js
index 3f4536db01..4eddb8123e 100644
--- a/server/services/embeddings.js
+++ b/server/services/embeddings.js
@@ -88,11 +88,25 @@ export async function embedText(text, options = {}) {
* the seed is consistent across commit, manual create, manual edit, and
* the admin backfill.
*
+ * Character canon shape uses `physicalDescription` + `personality` (per
+ * `sanitizeCharacter` in storyBible.js); without these in the seed, a
+ * character's main descriptive text is never embedded and semantic search
+ * misses every character whose content was captured through the inline New
+ * form or the writers-room/bible extractor — only the name would match.
+ *
* Returns `''` when there's nothing worth embedding so callers can skip.
*/
export function ingredientEmbedSeed({ name, payload } = {}) {
const p = payload || {};
- return [name, p.description, p.summary, p.notes, p.background]
+ return [
+ name,
+ p.description,
+ p.summary,
+ p.notes,
+ p.background,
+ p.physicalDescription,
+ p.personality,
+ ]
.filter(Boolean)
.join(' ')
.slice(0, 4000);