From 34f3a164ab88b5f128a8e0866ab859f73e75ee8f Mon Sep 17 00:00:00 2001 From: tommy0103 Date: Wed, 10 Jun 2026 02:05:27 +0800 Subject: [PATCH] feat(memory): persistent memory layer with remember/recall CodeAct API Add a memories table (survives index rebuilds) for agent-written conclusions with provenance (session, message range, project). The agent writes markdown files via Write tool (user-approved), then registers them via a --remember CodeAct script with remember(). Recall via memories() in --query scripts, filtered by project/session/time. Separates query (read-only, assertReadOnlySql) from remember (write) execution contexts in runtime.mjs. --- .gitignore | 3 +- README.md | 17 +++-- SKILL.md | 63 +++++++++++++++++- references/query-patterns.md | 75 ++++++++++++++++++++- references/retrieval-semantics.md | 21 +++--- references/schema.md | 106 ++++++++++++++++++++++++++++-- scripts/db.mjs | 7 ++ scripts/query.mjs | 77 +++++++++++++++++++++- scripts/runtime.mjs | 24 +++++-- 9 files changed, 364 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 080df8c..338e374 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store plans/ -.skillopt-backups \ No newline at end of file +.skillopt-backups +tests/ diff --git a/README.md b/README.md index b41d0ea..df39032 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ Every past session, subagent, and workflow -- queryable by your agent. Most history tools help humans find old chats. Obelisk is built for agents. It exposes past work as structured data: sessions, -messages, tool calls, subagents, workflows, file history, failures, and parent -chains. The agent writes the query, runs it locally, and answers in plain language. +messages, tool calls, subagents, workflows, file history, failures, parent +chains, and human-approved markdown memories. The agent writes the query, runs +it locally, and answers in plain language. You don't manage history. You ask questions about past work. @@ -88,6 +89,10 @@ Runs it via node runtime.mjs --query