claude-mem-lite 2.44.0 → 2.45.0
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.
package/hook-llm.mjs
CHANGED
|
@@ -431,15 +431,30 @@ export function buildImmediateObservation(episode) {
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
const ruleImportance = computeRuleImportance(episode);
|
|
434
|
-
// Low-signal degraded titles ("
|
|
435
|
-
//
|
|
434
|
+
// Low-signal degraded titles ("Modified X", "Worked on X", "Reviewed N files")
|
|
435
|
+
// should not inflate importance. computeRuleImportance's file-name heuristics
|
|
436
|
+
// (schema.*, migration, auth.*, .env, .pem) fire on any matching file in the
|
|
437
|
+
// episode, so a 5-file review that incidentally reads one schema.js triggers
|
|
438
|
+
// imp=3 even though schema.js was one of 5 scanned — not the focus. Combined
|
|
439
|
+
// with a LOW_SIGNAL title (Haiku couldn't extract meaning), we can't justify
|
|
440
|
+
// imp=3; cap at 2 so rule says "notable" but not "critical".
|
|
441
|
+
//
|
|
442
|
+
// Production baseline (2026-04-23, projects--mem): 34/100 discovery/imp=3
|
|
443
|
+
// obs were LOW_SIGNAL titles; 7 change/imp=3 same. Prior cap `rule<=2 → 1`
|
|
444
|
+
// only fired when rule was weak, letting rule=3 leak through. New cap:
|
|
445
|
+
// isReviewPattern → 2 (was Math.max(2, rule) → rule=3 leaked as 3)
|
|
446
|
+
// isLowSignal & !review:
|
|
447
|
+
// rule=3 → 2 (was 3) — the fix
|
|
448
|
+
// rule<=2 → 1 (unchanged) — original cap preserved
|
|
436
449
|
const LOW_SIGNAL = LOW_SIGNAL_TITLE;
|
|
437
450
|
const isLowSignal = LOW_SIGNAL.test(title);
|
|
438
451
|
let importance;
|
|
439
452
|
if (isReviewPattern) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
importance =
|
|
453
|
+
// Review titles are auto-generated from file count — can't distinguish
|
|
454
|
+
// "critical file was primary focus" from "one of N files read". Cap at 2.
|
|
455
|
+
importance = 2;
|
|
456
|
+
} else if (isLowSignal) {
|
|
457
|
+
importance = ruleImportance === 3 ? 2 : 1;
|
|
443
458
|
} else {
|
|
444
459
|
importance = ruleImportance;
|
|
445
460
|
}
|