@voidwire/lore 1.8.1 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,6 @@ export async function findCandidates(
78
78
 
79
79
  return hybridSearch(content, {
80
80
  source,
81
- project: topic || undefined,
82
81
  limit: CANDIDATE_LIMIT,
83
82
  });
84
83
  }
@@ -110,10 +109,13 @@ export async function classifyContradiction(
110
109
  .map((c) => `[rowid: ${c.rowid}] ${c.content}`)
111
110
  .join("\n");
112
111
 
113
- const systemPrompt = `You classify knowledge contradictions. Reply with exactly one word: ADD, NOOP, or DELETE.
114
- ADD: new information not covered by candidates
115
- NOOP: duplicate or redundant (already captured)
116
- DELETE: new information supersedes a candidate (also provide rowid)`;
112
+ const systemPrompt = `You deduplicate knowledge entries. Your job is to prevent storing the same insight multiple times.
113
+
114
+ Reply NOOP if the new entry means the same thing as ANY existing entry — even if the words are different.
115
+ Reply DELETE <rowid> if the new entry is a better version of an existing entry.
116
+ Reply ADD only if the new entry contains a genuinely novel insight not present in any existing entry.
117
+
118
+ When in doubt, reply NOOP. Redundancy is worse than missing an entry.`;
117
119
 
118
120
  const userPrompt = `New entry (source: ${source}, topic: ${topic}):
119
121
  ${content}
@@ -2,7 +2,7 @@
2
2
  * lib/indexers/personal.ts - Personal data indexer
3
3
  *
4
4
  * Reads JSON files from the personal data directory and indexes
5
- * 8 types: book, person, movie, podcast, interest, habit, profile, preference.
5
+ * 8 types: book, contact, movie, podcast, interest, habit, profile, preference.
6
6
  *
7
7
  * Source: personal
8
8
  * Topic: (empty - type handles categorization)
@@ -31,10 +31,11 @@ Keep under 80 words. Output only the description, no headers or formatting.`;
31
31
 
32
32
  const ENRICH_PROMPTS: Record<string, string> = {
33
33
  person: `You are enriching a personal contact entry for search indexing.
34
- The "relationship" field is the EXACT relationship do NOT add other relationship types.
35
- Generate synonyms and alternative phrasings ONLY for the stated relationship.
36
- Example: relationship "uncle" → uncle, family member, relative, parent's brother, parent's sibling. NOT: cousin, nephew, aunt.
37
- Example: relationship "daughter" → daughter, child, kid, offspring, family member. NOT: son, niece, nephew.
34
+ Generate a natural language description that includes the person's name and their relationship.
35
+ Include synonyms for the relationship naturally in the sentence.
36
+ Example: {"name":"Mike","relationship":"uncle"}Mike is an uncle, a family member and relative on the parent's side.
37
+ Example: {"name":"Jade","relationship":"child"}Jade is a child, a kid and offspring in the family.
38
+ Example: {"name":"Sansa","relationship":"cat"} → Sansa is a cat, a pet and feline companion in the household.
38
39
  ${ENRICH_SHARED}`,
39
40
  book: `You are enriching a book entry for search indexing.
40
41
  Generate: genre, themes, and related topics based on the title.
@@ -152,7 +153,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
152
153
  title: person.name,
153
154
  content,
154
155
  topic: "",
155
- type: "person",
156
+ type: "contact",
156
157
  timestamp: peopleTs,
157
158
  metadata: { name: person.name },
158
159
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidwire/lore",
3
- "version": "1.8.1",
3
+ "version": "1.8.4",
4
4
  "description": "Unified knowledge CLI - Search, list, and capture your indexed knowledge",
5
5
  "type": "module",
6
6
  "main": "./index.ts",