clemvault internals alpha

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.

Development timeline

3 logged updates over 34 days, 15 May 2026 to 17 Jun 2026.

  1. A staging surface for signal picked up between sessionsfeature

    A read-only discovery heartbeat was added that scans local sources and stages what it finds, proposing only and never editing the vault. It is not a memory write, and it was not built for this project.

  2. The memory surfaces landed firstfeature

    Two skills arrived on the same day and they are what memory is actually made of today. One owns the topic files and the index that lists them, creating, updating and removing entries, and reads the handoff without writing it.

  3. Scoped: memory should be written by events, not by one commandfeature

    The complaint behind this project was that a whole session's learning depended on remembering to run one command at the end of it. If that command was skipped, or the session ended badly, the memory of it was gone.

Written from this project's decision log as work happened, not afterwards. See every project →