Skip to content
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
234343e
fix: preserve collection name on MCP search retry
trek-e May 26, 2026
071fa01
feat: add Cursor IDE support (hooks, plugin, skill, docs, tests)
undeadindustries May 27, 2026
df5db57
fix(cursor): address gemini-code-assist review on PR #1632
undeadindustries May 27, 2026
bf156fb
feat: add Antigravity IDE support (plugin, MCP, skill, hooks, docs, t…
undeadindustries May 27, 2026
b06cf24
fix(antigravity): address gemini-code-assist review on PR #1633
undeadindustries May 27, 2026
df295bd
fix(antigravity): atomic counter write, background --version probe, s…
undeadindustries May 30, 2026
c420a9f
fix(cursor): address igorls review on PR #1632
undeadindustries May 30, 2026
a329acf
fix(antigravity): resolve interpreter from console-script shebang
undeadindustries May 31, 2026
9be2b97
fix(backups): add max_backups retention to bound backup disk usage
margaretjgu Jun 5, 2026
2a66bad
feat(mcp): add mempalace_mine tool (#1662)
mvalentsev Jun 4, 2026
c9dc4c4
fix(miner): count only new work toward --limit, not already-mined ski…
mvalentsev May 25, 2026
c4da6d5
fix(searcher): scope neighbor expansion by parent_drawer_id (#1580)
mvalentsev Jun 6, 2026
b1537be
fix(mcp): drop top-level anyOf from diary_write schema
Hexecu Jun 6, 2026
6c5e1be
fix(mcp): fail closed when add_drawer idempotency pre-check fails
thismilktea Jun 7, 2026
9a8c87a
fix(backends): keep post-deletion dim-None HNSW segments instead of q…
mvalentsev Jun 7, 2026
ffa8ac1
feat(searcher): metric-aware distance→similarity conversion (RFC 001 …
igorls Jun 8, 2026
5214470
Merge pull request #1727 from MemPalace/feat/searcher-backend-neutral
igorls Jun 8, 2026
212051d
feat(backends): embedder-identity contract + three-state enforcement …
igorls Jun 8, 2026
13de7a6
Merge pull request #1731 from MemPalace/feat/embedder-identity
igorls Jun 8, 2026
fdbafe5
feat(backends): observable maintenance hooks + pgvector indexed-build…
igorls Jun 8, 2026
4ceb880
Merge pull request #1732 from MemPalace/feat/maintenance-hooks
igorls Jun 8, 2026
ed77125
feat(backends): shared embedder-identity sidecar + qdrant identity (R…
igorls Jun 8, 2026
676ee68
fix(mcp): preserve room/wing casing on case-only update
Sathvik-1007 Jun 8, 2026
d514787
fix(mcp): str-coerce metadata before case comparison
Sathvik-1007 Jun 8, 2026
eab1196
feat(mcp): expose list_hallways and delete_hallway tools
ggettert Jun 8, 2026
ef2261f
docs(mcp): document list_hallways and delete_hallway tools
ggettert Jun 8, 2026
d05bb11
Merge pull request #1734 from MemPalace/feat/qdrant-embedder-identity
igorls Jun 8, 2026
24ad98d
feat: add mempalace-recall skill and optional Cursor recall rule
undeadindustries Jun 10, 2026
d057dee
fix(repair): run post-rebuild FTS5 cleanup on legacy cmd_repair path …
mvalentsev Jun 10, 2026
7d7dc78
Merge pull request #1723 from mvalentsev/fix/hnsw-dim-none-deletions
igorls Jun 10, 2026
140c380
Merge pull request #1697 from margaretjgu/fix/backup-retention
igorls Jun 10, 2026
8c120be
Merge pull request #1692 from mvalentsev/feat/1662-mcp-mine-tool
igorls Jun 10, 2026
77eaa31
Merge pull request #1622 from mvalentsev/fix/1535-mine-limit-skips-al…
igorls Jun 10, 2026
4d60db0
Merge pull request #1741 from ggettert/feat/mcp-list-hallways
igorls Jun 10, 2026
ad67c1a
Merge pull request #1737 from Sathvik-1007/fix/1621-update-drawer-roo…
igorls Jun 10, 2026
692599a
merge: resolve CHANGELOG conflict with develop
igorls Jun 10, 2026
df0e29a
fix(test): make hybrid search closet preview test robust on Windows
igorls Jun 10, 2026
f124bd2
Merge pull request #1633 from undeadindustries/feat/antigravity-support
igorls Jun 10, 2026
fc89a1b
feat(antigravity): add recall skill, optional rule, shared protocol
undeadindustries Jun 11, 2026
60a4610
fix(antigravity): sync recall skill protocol with canonical shared so…
undeadindustries Jun 11, 2026
2ec4bae
Merge pull request #1771 from undeadindustries/feat/antigravity-support
igorls Jun 11, 2026
f31db69
merge: resolve CHANGELOG conflict with develop
igorls Jun 11, 2026
8e19e81
merge: resolve recall-protocol conflict with develop
igorls Jun 11, 2026
07f8789
fix(embedding): chunk EmbeddinggemmaONNX batches to bound ONNX memory…
mvalentsev Jun 11, 2026
4187521
fix(embedding): lock EF cache and lazy load, guard inputs (#1770)
mvalentsev Jun 11, 2026
bf71ae7
fix(hallways): scope hallway-file path to MempalaceConfig.palace_path…
ggettert Jun 11, 2026
4fd1231
fixup(hallways): drop _HALLWAY_FILE back-compat shim, migrate existin…
ggettert Jun 11, 2026
f5ee33b
fixup(hallways): address gemini-code-assist review on PR #1780
ggettert Jun 11, 2026
5024e90
fix(ids): use length-prefixed recipe v3
fatkobra Jun 11, 2026
0fc3a23
fix(mcp): treat chunked drawers as logical drawers
fatkobra Jun 11, 2026
7e45720
Merge pull request #1632 from undeadindustries/feat/cursor-hooks-support
igorls Jun 11, 2026
761ebf7
fix(mcp): avoid mutating drawer metadata
fatkobra Jun 12, 2026
5a8f025
fix(ids): simplify v3 length-prefixed hashing
fatkobra Jun 12, 2026
0b00d78
fix(hooks): normalize Windows transcript paths in shell hooks
fatkobra Jun 12, 2026
f6b6a69
fix(backends): serialize first connect in sqlite_exact and pgvector (…
mvalentsev Jun 12, 2026
41e5c20
fix(hooks): preserve fail-loud parse diagnostics
fatkobra Jun 12, 2026
950713e
fix(hooks): typo regression addressed
fatkobra Jun 13, 2026
4fbdaf2
Merge pull request #1793 from mvalentsev/fix/1774-backend-connect-races
igorls Jun 14, 2026
528d711
Merge pull request #1782 from fatkobra/fix/1763-mcp-logical-chunked-d…
igorls Jun 14, 2026
c504345
Merge pull request #1749 from mvalentsev/fix/repair-legacy-fts5-postrun
igorls Jun 14, 2026
b286701
Merge pull request #1777 from mvalentsev/fix/1770-embeddinggemma-chun…
igorls Jun 14, 2026
80c3760
Merge pull request #1790 from fatkobra/fix/1772-shell-hooks-delegate-…
igorls Jun 14, 2026
75eb86a
Merge pull request #1781 from fatkobra/fix/1776-id-recipe-v3-clean
igorls Jun 14, 2026
7e4bd81
Merge pull request #1780 from ggettert/fix/hallway-file-palace-scoped
igorls Jun 14, 2026
0a2937d
Merge pull request #1582 from mvalentsev/fix/1580-neighbor-scope-pare…
igorls Jun 14, 2026
422edc2
Merge pull request #1717 from Hexecu/fix/diary-write-schema-anyof
igorls Jun 14, 2026
97ba05c
fix(mcp): avoid Chroma open when cached DB disappears
igorls Jun 14, 2026
f89bc08
test: stabilize release validation on develop
igorls Jun 14, 2026
5d5397b
fix(palace): clean source mine locks safely
igorls Jun 14, 2026
d860a00
fix: close blob seq sqlite migration connection
igorls Jun 14, 2026
8e53959
Merge pull request #1802 from MemPalace/codex/develop-341-ci-polish
igorls Jun 14, 2026
9f16295
Merge pull request #1721 from thismilktea/fix/mcp-add-drawer-idempote…
igorls Jun 14, 2026
58c45a9
Merge pull request #1804 from MemPalace/codex/close-blob-seq-sqlite
igorls Jun 14, 2026
a40e0b7
fix: address mine lock review feedback
igorls Jun 14, 2026
0cb4508
Merge pull request #1624 from trek-e/fix/search-retry-preserve-collec…
igorls Jun 14, 2026
7f5bbd8
Merge pull request #1803 from MemPalace/codex/1800-mine-lock-cleanup
igorls Jun 14, 2026
160a852
test: stabilize closet boost fixture on Windows
igorls Jun 14, 2026
68a971b
Merge pull request #1807 from MemPalace/codex/develop-341-windows-clo…
igorls Jun 14, 2026
b5c79a1
chore(release): 3.4.1
igorls Jun 14, 2026
327da58
Merge pull request #1809 from MemPalace/chore/release-3.4.1
igorls Jun 14, 2026
868b4c9
fix(hooks): portable mtime in macOS hook throttles; doc cleanup
igorls Jun 14, 2026
3f20305
style(hooks): single-quote the static python -c mtime snippet
igorls Jun 15, 2026
db6e4f0
Merge pull request #1811 from MemPalace/fix/3.4.1-review-followups
igorls Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .antigravity-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# MemPalace — Antigravity plugin

In-repo packaging for the MemPalace integration with Google's [Antigravity IDE](https://antigravity.google/).

This directory is the source of truth for what gets installed at
`~/.gemini/config/plugins/mempalace/` when the user runs the installer.

## Layout

```
.antigravity-plugin/
├── plugin.json # marker manifest (verified minimal schema)
├── mcp_config.json # auto-registers the mempalace-mcp stdio server
├── hooks.json.tmpl # template — installer renders to hooks.json
├── skills/
│ ├── mempalace/
│ │ └── SKILL.md # ops skill: setup, mine, status, CLI delegation
│ └── mempalace-recall/
│ └── SKILL.md # recall-only skill: search-before-answer protocol
├── rules/
│ └── mempalace-recall.md # optional recall rule (complements the skill)
└── README.md # this file
```

The hook scripts themselves live at `hooks/antigravity/`. The installer
copies them into `<install-dir>/hooks/` and renders `hooks.json.tmpl`
into a `hooks.json` whose `command` paths point at the absolute install
location.

## Three recall layers

MemPalace can store everything, but it only helps if the agent actually
*reads* the palace before answering. Three layers wire that in, from
eager to on-demand:

1. **Wake hook** (`hooks/antigravity/mempal_wake_hook_antigravity.sh`,
`PreInvocation` event, gated to `invocationNum == 1`). On the first
model call of a conversation it runs `mempalace wake-up` and injects
the **actual palace content verbatim** via Antigravity's
`injectSteps[].ephemeralMessage` output. This is Antigravity's native
equivalent of Cursor's `sessionStart` `additional_context`, except it
delivers the memory itself rather than a directive to go fetch it.
2. **Recall skill** (`skills/mempalace-recall/SKILL.md`). The
search-before-answer protocol the agent follows when a turn is
recall-relevant — tool selection, unhappy paths, anti-patterns. It
covers recall only; the `mempalace` skill covers setup / mine /
status.
3. **Optional recall rule** (`rules/mempalace-recall.md`). A lightweight
markdown rule that nudges the agent to search before answering when
Antigravity's matcher decides the turn is recall-relevant. It is
deliberately recall-scoped (not an always-on global rule) so it never
adds latency to greenfield work, honouring MemPalace's "memory should
feel instant" budget.

All three point to the single canonical protocol in
[`integrations/shared/recall-protocol.md`](../integrations/shared/recall-protocol.md)
so the skill and rule never drift.

## Install

```bash
bash hooks/antigravity/install.sh
```

The installer is idempotent and the uninstaller matches by basename, so
re-runs and partial installs are safe.

See [website/guide/antigravity.md](../website/guide/antigravity.md) for
the full user-facing guide and [hooks/antigravity/README.md](../hooks/antigravity/README.md)
for the hooks-specific documentation.

## Verified surfaces

Every file in this directory maps to a surface verified against
[Google's Antigravity docs](https://antigravity.google/docs/). See
[hooks/antigravity/INVESTIGATION.md](../hooks/antigravity/INVESTIGATION.md)
for the full audit, including the surfaces deliberately not shipped.
20 changes: 20 additions & 0 deletions .antigravity-plugin/hooks.json.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mempalace-save": {
"Stop": [
{
"type": "command",
"command": "__PLUGIN_DIR__/hooks/mempal_save_hook_antigravity.sh",
"timeout": 30
}
]
},
"mempalace-wake": {
"PreInvocation": [
{
"type": "command",
"command": "__PLUGIN_DIR__/hooks/mempal_wake_hook_antigravity.sh",
"timeout": 5
}
]
}
}
7 changes: 7 additions & 0 deletions .antigravity-plugin/mcp_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"mcpServers": {
"mempalace": {
"command": "mempalace-mcp"
}
}
}
3 changes: 3 additions & 0 deletions .antigravity-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "mempalace"
}
18 changes: 18 additions & 0 deletions .antigravity-plugin/rules/mempalace-recall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# MemPalace recall

Before answering anything that may already be in the user's memory
palace — past work, prior decisions, a person, a project, or "what did
we do / decide / discuss last time?" — search the palace first:

1. Call `mempalace_search` with a short keyword query. Use
`mempalace_kg_query` for relational or time-bound facts.
2. Quote the drawer's **verbatim** text. Never summarize or paraphrase
stored content.
3. If results are empty, say so — do not invent an answer. If the MCP
server is unavailable, surface the error; do not fall back to guessing.

Skip recall for pure greenfield work with no memory relevance (renaming
a variable, fixing a typo). Recall is question-driven, not reflexive.

Full protocol: <https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md>. Deeper guidance:
the `mempalace-recall` skill.
119 changes: 119 additions & 0 deletions .antigravity-plugin/skills/mempalace-recall/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
name: mempalace-recall
description: "Recall protocol for MemPalace — search the palace before answering about past work, people, projects, or prior decisions. Apply when the user asks what was decided, what happened before, who someone is, what was discussed last time, or anything that may already be filed in their memory palace; or when mempalace-recall is invoked. Complements the mempalace setup skill and requires the mempalace-mcp server."
---

# MemPalace Recall

Search-before-answer protocol for MemPalace. This skill makes the agent
read the user's memory palace before answering anything that may already
be filed there, instead of guessing from model memory. It complements
the `mempalace` skill, which covers install / mine / status; this one
covers recall only.

## Step 0 — Verify MemPalace is available

Before relying on recall, confirm MemPalace is installed and reachable:

- Official release page: <https://github.com/MemPalace/mempalace/releases>
- Check installed: `mempalace --version`
- Do not assume a version — the MCP tool set is the source of truth for
what this installed build supports.

If the `mempalace_*` MCP tools are not available, tell the user the
server is not connected and point them at the `mempalace` skill to set
it up. Do not silently fall back to answering from model memory.

## Identity

Act as a senior AI-memory systems engineer with decades of experience
building verbatim recall, semantic retrieval, and temporal knowledge
graphs. Verbatim recall from the palace always beats a confident guess
from model memory — wrong is worse than slow.

## When to recall

Search the palace **before answering** whenever the user asks about
something that may already be filed:

- Past work or prior decisions — "what did we decide / try / do?"
- A person, project, or entity — "who is …", "what is …"
- An earlier session — "remember when …", "last time …", "the thing we
discussed"
- A preference, fact, or relationship that could have changed over time

Do **not** search on pure greenfield work with no memory relevance
(e.g. "rename this variable", "fix this typo"). Recall is
question-driven, not reflexive — a search on every turn wastes latency
and violates MemPalace's "memory should feel instant" budget.

## Protocol

1. On wake-up, the MemPalace PreInvocation hook injects verbatim palace
content via `injectSteps[].ephemeralMessage` on the first model call
of a conversation. If memory was injected, start from it before
searching further.
2. **Before responding** about people, projects, past events, or prior
decisions: call `mempalace_search` first. For relational or temporal
facts ("who reported to whom in March", "what was true then"), call
`mempalace_kg_query` instead or as well.
3. **If unsure** about a fact (name, age, relationship, preference): say
"let me check the palace" and query. Wrong is worse than slow.
4. **Return verbatim.** Quote the drawer's exact stored words. Never
summarize, paraphrase, or lossy-compress what the palace returns —
that is the whole point of the system.
5. **After a substantive session**, record continuity with
`mempalace_diary_write` (background hooks may already do this — do not
double-file).
6. **When a fact changes**, call `mempalace_kg_invalidate` on the old
fact, then `mempalace_kg_add` for the new one.

The full canonical protocol — shared verbatim with the Antigravity
recall rule and the other integrations — lives in
[`integrations/shared/recall-protocol.md`](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).

## Tool selection

| You need | Tool |
|---|---|
| Find any memory by meaning | `mempalace_search` (start here) |
| Relational / time-bound facts about an entity | `mempalace_kg_query` |
| The chronological story of an entity | `mempalace_kg_timeline` |
| Recent session continuity | `mempalace_diary_read` |
| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |
| Record this session | `mempalace_diary_write` |

`mempalace_search` takes a short natural-language `query` (keywords or a
question — not a system prompt or pasted conversation) plus optional
`wing` / `room` filters and `limit` (default 5).

## Unhappy paths

- **Empty results.** Say the palace has nothing on this; do not invent an
answer to fill the gap. Offer to widen the search (drop the wing
filter) or to file the new information.
- **MCP unavailable / tool error.** Surface the error plainly and suggest
the user verify the server (`mempalace status`, or re-run the
installer `hooks/antigravity/install.sh`). Do not silently fall back
to guessing from model memory.
- **Stale or conflicting facts.** Prefer the knowledge graph's
time-valid answer; if a fact has changed, invalidate the old one and
add the new one rather than overwriting context silently.

## Anti-patterns — never do these

- Answering about past work, people, or decisions from model memory when
the palace might know — search first.
- Paraphrasing or summarizing stored content instead of quoting it
verbatim.
- Searching reflexively on every turn, including pure greenfield coding
with no memory relevance.
- Pasting the full conversation or a system prompt into the `query`
argument — keep queries short and keyword-driven.

## Official References

- MemPalace: <https://github.com/MemPalace/mempalace>
- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>
- Antigravity documentation: <https://antigravity.google/docs>
- Agent Skills specification: <https://agentskills.io/specification>
92 changes: 92 additions & 0 deletions .antigravity-plugin/skills/mempalace/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
name: mempalace
description: MemPalace — mine projects and conversations into a searchable memory palace. Use when the user asks about MemPalace, memory palace, mining memories, searching memories, palace setup, wings, rooms, or drawers; or when they want to recall past work that may already be filed in their palace.
---

# MemPalace

A searchable memory palace for AI — mine projects and conversations, then search them semantically. Verbatim storage, local-first, zero external API by default.

## Prerequisites

Ensure `mempalace` is installed:

```bash
mempalace --version
```

If not installed (uv recommended):

```bash
uv tool install mempalace # or: pip install mempalace
```

## Dynamic, version-correct instructions

MemPalace exposes operation-specific instructions through the CLI so this skill stays accurate as MemPalace evolves. To get instructions for any operation:

```bash
mempalace instructions <command>
```

Always prefer the CLI output over what is written here when the two disagree — the CLI is the single source of truth for the installed version.

## Common operations

These are the five operations users ask for most often. Each one wraps a single MemPalace CLI subcommand. The `mempalace instructions <name>` form returns the full, version-correct guidance.

### `help` — discover what MemPalace can do

```bash
mempalace instructions help
```

Use when the user is new, unsure what's possible, or asks "what can you do".

### `init` — first-run setup of the palace

```bash
mempalace instructions init
```

Use when the user has just installed MemPalace, no palace exists yet, or the user explicitly asks to set up / configure / re-initialize their palace.

### `mine` — ingest a project or conversation directory

```bash
mempalace instructions mine
```

Use when the user wants to fold a project's files into their palace, or to ingest exported conversation transcripts into the palace as searchable memory.

### `search` — find verbatim memories by semantic query

```bash
mempalace instructions search
```

Use when the user wants to recall something from the past, find a previous decision, or rediscover code/notes/conversations they already wrote.

### `status` — what's in the palace right now

```bash
mempalace instructions status
```

Use when the user asks "what's in my palace", "how big is my palace", or wants a summary of wings, rooms, and drawer counts.

## MCP tools (preferred over CLI)

Inside Antigravity, the MemPalace MCP server registers a rich set of tools. Use these instead of shelling out to the CLI for live operations (search, diary writes, drawer adds, knowledge graph queries, palace status). The MCP tools always reflect the current palace state without spawning a subprocess.

The MCP server is auto-registered when this plugin is installed at `~/.gemini/config/plugins/mempalace/`. If the server does not appear in Antigravity's MCP store, run `mempalace-mcp --version` to verify the binary is on PATH, then restart Antigravity.

## Design principles (verbatim from the project)

- **Verbatim always** — never summarize, paraphrase, or lossy-compress user data.
- **Local-first, zero external API by default** — extraction, embedding, and LLM-assisted refinement happen on the user's machine.
- **Privacy by architecture** — the system never calls out to external services for core operations.
- **Performance budgets** — hooks under 500ms; startup injection under 100ms.
- **Background everything** — filing, indexing, and timestamps happen via hooks in the background; zero tokens spent on bookkeeping in the chat window.

If a request would violate any of these principles, refuse and explain — even if it would be technically convenient.
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "mempalace",
"source": "./.claude-plugin",
"description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.",
"version": "3.4.0",
"version": "3.4.1",
"author": {
"name": "milla-jovovich"
}
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mempalace",
"version": "3.4.0",
"version": "3.4.1",
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
"author": {
"name": "milla-jovovich"
Expand Down
Loading
Loading