feat(md): markdown-based memory store with db0 CLI#20
Open
lightcone0 wants to merge 11 commits intomainfrom
Open
feat(md): markdown-based memory store with db0 CLI#20lightcone0 wants to merge 11 commits intomainfrom
lightcone0 wants to merge 11 commits intomainfrom
Conversation
Markdown-first CLI tool that turns a directory of markdown files into a managed memory system with smart write (dedup + supersede), search, context assembly, and garbage collection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tasks: package scaffolding, ContentStore, markdown parser, MemoryStore engine, tests, CLI binary, and final integration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Core engine for the db0/md memory system. MemoryStore provides: - remember(): smart write with threshold-based dedup/supersede - search(): brute-force cosine similarity search via hashEmbed - pack(): context assembly with token budget - consolidate(): GC (archive superseded, expire old session/task, merge dupes) - generateIndex(): generate MEMORIES.md grouped by scope Includes tests for remember (4) and search (4), all passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dex commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MEMORIES.md is now auto-generated after every remember and consolidate operation, matching the design spec. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
One brand, one command. Rename the CLI binary from mdcli to db0 and the package from @db0-ai/mdcli to @db0-ai/db0. Add a comprehensive README for the md package and list it in the root packages table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/mdpackage (@db0-ai/db0) — a markdown-based memory store for AI agentsdb0with 5 commands:remember,search,pack,consolidate,indexMemoryStoreclass with the same capabilities@db0-ai/core(uses hash embeddings, no API calls)ls memories/tells you everythingWhat's included
MemoryStore,LocalContentStore, markdown parser/serializer, types--dir,--scope,--tags,--limit,--budgetoptionsTest plan
cd packages/md && npm test— all 7 test suites passnpm run build— compiles cleanlynpx db0— prints helpnpx db0 remember "test fact" --dir /tmp/test-memories— creates filenpx db0 search "test" --dir /tmp/test-memories— finds resultnpx db0 pack --dir /tmp/test-memories— outputs context block🤖 Generated with Claude Code