Skip to content

Add local personal memory#808

Open
alecuba16 wants to merge 1 commit into
DeusData:mainfrom
alecuba16:personal-memory
Open

Add local personal memory#808
alecuba16 wants to merge 1 commit into
DeusData:mainfrom
alecuba16:personal-memory

Conversation

@alecuba16

Copy link
Copy Markdown

This pull request adds a local personal memory system for codebase notes, decisions, and learnings. It is intentionally separated from the fork release workflow work so this PR only contains the personal-memory feature.

This replaces the closed broad PR #761 with the workflow option removed, and addresses the security review note from #761 (comment).

Personal memory

The main addition is a per-repo personal memory that lives outside the repository, in the user's local data directory. The goal is to let an agent or developer store notes, decisions, and learnings about a codebase without writing files into the source repository or pushing that context upstream.

A new MCP tool called manage_memory is exposed with these modes:

  • get
  • update
  • sections
  • settings
  • bootstrap
  • delete
  • list
  • promote
  • sync

manage_adr also gains an optional scope parameter so it can target either project-scoped ADRs, which remains the default for compatibility, or personal memory.

The memory directory, default scope, and enablement are configurable. A new platform helper, cbm_resolve_memory_dir, resolves the correct local user-data path for each operating system.

Security and local-only behavior

After the review comment on #761, I added a focused security hardening pass in commit 5f0f4b6:

  • Personal memory storage directories are created with private 0700 permissions on POSIX systems.
  • Existing memory directories are chmod-corrected to 0700 when opened for writes.
  • manage_memory(settings) redacts local filesystem paths by default.
  • Local paths can only be shown explicitly with reveal_paths=true.
  • MCP responses redact repo IDs and storage keys because they are derived from local canonical repo paths.
  • delete is now idempotent, returns not_found when appropriate, and no longer creates a DB just to delete from it.
  • promote and sync are local copy operations only. Responses now explicitly report local_only and network_sync=disabled.
  • Tests cover path redaction, private directory permissions, local-only metadata, and delete semantics.

Nothing in this feature uploads personal memory to the repository, remotes, package registries, or external services. Storage is local SQLite under the resolved personal memory directory.

Other changes

  • README and embedded skill documentation explain the personal memory workflow.
  • The smoke invariants script covers the new memory paths.
  • Tests cover manage_memory and personal scope in manage_adr.
  • A cross-platform cbm_setenv / cbm_unsetenv helper was added for Windows-compatible tests.

Validation

  • Rebased on current upstream main at 09148ab.
  • make -f Makefile.cbm test passes locally: 5766 passed.

@alecuba16 alecuba16 requested a review from DeusData as a code owner July 3, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant