Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

MemorySystem.md says memory hooks live in settings.system.json; in 8.x hooks are installer-owned

Open gjaworski86 opened this issue 3 weeks ago • 2 comments

What the doc says

LIFEOS/DOCUMENTATION/Memory/MemorySystem.md (Health gate addendum, "Source-of-truth wiring"):

the memory hooks (MemoryTurnStart, MemoryReviewFire, MemoryHealthGate) live in settings.system.json so LIFEOS/TOOLS/MergeSettings.ts regeneration at SessionStart preserves them.

What 8.761.0 actually does

  • The shipped skills/LifeOS/install/settings.system.json has no hooks key at all.
  • MergeSettings.ts lists hooks in INSTALLER_OWNED_KEYS: when no system layer owns hooks, the installed hooks in settings.json are the base the overlay merges onto. So the memory hooks are preserved by the installer, not by settings.system.json.

Why it matters

An audit that follows the doc and greps settings.system.json for MemoryReviewFire concludes the memory review loop is unregistered, even though the hook is wired in settings.json and runs normally (reviewer-fires.jsonl and reviewer-runs.jsonl show regular, successful runs). We hit exactly this false alarm.

MemoryHealthCheck.ts is described in the same addendum as checking registrations "in BOTH settings.system.json AND settings.json", which may need the same update.

Suggested fix

Change the line to say the memory hooks are installer-owned (INSTALLER_OWNED_KEYS in MergeSettings.ts) and live in the merged settings.json.

Checked on LifeOS 8.761.0, 2026-11-08.

gjaworski86 avatar Nov 08 '26 19:11 gjaworski86

On the last point: MemoryHealthCheck.ts makes the same assumption in code, and there it hides a real failure. It takes intent only from settings.system.json (MemoryHealthCheck.ts:198-215), which has no hooks key in 8.761.0, so no memory hook ever counts as intended. When a registration is then lost from settings.json, the check reports warn settings-hook-absent ("autonomic memory loop not enabled on this install") instead of critical settings-hook-missing, the silent-loss case it exists for. The installer's own manifest is hooks/hooks.json (read by skills/LifeOS/Tools/InstallHooks.ts), and it declares MemoryTurnStart.

Suggested fix: take intent from hooks/hooks.json as well, report a CRITICAL when a layer that exists does not parse, and name the declaring layer in the missing-hook message. We patched it that way locally and ran both on a scratch config root with MemoryTurnStart removed from settings.json: shipped warn settings-hook-absent:MemoryTurnStart.hook.ts, patched critical settings-hook-missing:MemoryTurnStart.hook.ts; with the hook registered, the patched check reports no missing hook.

Luo0oo avatar Nov 11 '26 02:11 Luo0oo

[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

The doc placed the memory hooks in settings.system.json, and the health check took its idea of which hooks should exist only from that file. On a public install the installer owns the hooks, so a lost memory hook read as 'not enabled' instead of a real breakage. The check now also reads the installer's hook manifest: a memory hook that either layer declares but settings.json lacks is critical and names the layer that declared it. The doc now says the hooks are installer-owned and merged into settings.json.

This fix lands in the next LifeOS release, so I'm closing this now.

danielmiessler avatar Nov 20 '26 00:11 danielmiessler