clemvault internals alpha Week · #21

Memory with Events

An event-driven system that auto-syncs ClemVault memory to Obsidian, Notion, and GitHub whenever meaningful things happen — not just on /session-end.

Node.jsYAMLObsidianNotionGit

The /session-end command handles memory sync, but it only runs when you remember to run it. Events that happen mid-session, insights from a debugging pass, a decision made at 11pm — those often go unlogged. Memory surfaces drift out of sync between sessions.

The Problem

Manual /session-end creates a single point of failure for memory. Anything that happens outside that command doesn’t get recorded. Memory drifts. Context rots. The vault stops reflecting the current state of the build.

What It Is

A lightweight event bus (Node.js EventEmitter) that fires on meaningful vault actions: session end, milestone reached, content published, significant decision made. Routing rules in a YAML config map each event type to the appropriate sync target: Obsidian, Notion, or a git commit. A emit-event CLI command handles manual overrides.

Event Types

Stack

ToolRole
Node.js EventEmitterEvent bus
YAMLRouting rules config
ObsidianLocal memory target
NotionShared/cloud memory target
GitCode and decision history

Includes a 5-minute deduplication window to prevent duplicate writes from rapid event firing.