[FEAT] user-level memory layer (v3.0.0)#8
Open
gradyzhuo wants to merge 26 commits into
Open
Conversation
Adds a design doc for restoring the user-global memory layer that Claude Code never natively provided and that origin takeover further masked. Covers MCP tools, SessionStart hook installers for Claude/Codex/Gemini, CLI rename (orrery memory project/user sub-groups), wizard changes, and v3.0.0 breaking-change rollout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 TDD-structured tasks covering: foundation (model fields, paths, MemoryStore extraction), MCP & CLI plumbing (new tools, breaking project/user rename), three hook installers, env-create wizard, origin parity, v3.0.0 release prep. Co-Authored-By: Claude Opus 4.7 (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
Adds a true user-global memory layer at
~/.orrery/user/memory/— cross-project, cross-env personal memory served via:shareUserMemory, default enabled).orrery_user_memory_readandorrery_user_memory_writefor programmatic writes.orrery memory user info / path / emit / export / enable / disable.orrery createandorrery setup, plus a--no-user-memoryflag.Restores the user-level memory concept that Claude Code never natively provided and that origin takeover incidentally masked (
~/.claude/CLAUDE.mdgot folded into theoriginenv).Breaking change → v3.0.0
orrery memory <info|export|isolate|share|storage>is renamed toorrery memory project <...>. No aliases. Scripts must be updated. CHANGELOG has a dedicated note.Design & Plan
docs/superpowers/specs/2026-05-18-user-level-memory-layer-design.mddocs/superpowers/plans/2026-05-19-user-level-memory-layer.md(23 TDD tasks)Architecture
MemoryStorevalue type encapsulatesMEMORY.md+fragments/read/write logic — shared between project- and user-layer.UserMemoryHookInstallerprotocol +JSONHookEditorshared logic; per-tool installers for Claude (settings.json), Codex (hooks.json), Gemini (<env>/gemini/settings.json)._orrery_managed: truemarker soremovenever clobbers foreign hook entries._reconcile-user-memory-hooksinternal command runs on everyorrery useto converge hook state to env config.OrreryEnvironmentandOriginConfigboth gain ashareUserMemory: Boolfield (defaults totrue; legacy JSON decodes tolerantly).Test plan
swift test— 172 tests in 46 suites pass (38 new tests vs. main baseline).MemoryStoreread/write/emit/fragments, all 3*HookInstallerlifecycles + foreign-entry preservation,EnvironmentStore.ensureUserMemoryHooksgating onshareUserMemory,addToolauto-install,applyEnable/applyDisablepersistence + hook side effects,MemoryCommandstructural rename.orrery --versionprints3.0.0;orrery memory --helpshows onlyproject+user;orrery memory user emitprints empty on fresh install and prints content when seeded.Follow-ups (non-blocking, from final code review)
orrery origin takeoverdoesn't install user-memory hooks (self-heals on nextorrery use; one-line fix).tryvstry?for hook install errors inaddToolvsensureUserMemoryHooks.--user-memoryflag is a silent no-op (ArgumentParser.prefixedNolimitation); document or split keys.MemoryStore.emit+readMemory+readUserMemoryin MCPServer) — consolidate when a third unrelated caller appears.CreateCommand --no-user-memoryflag through full CLI parse.🤖 Generated with Claude Code