Files
mempalace/.antigravity-plugin/README.md
T
undeadindustriesandCursor fc89a1b67e feat(antigravity): add recall skill, optional rule, shared protocol
Adds the recall layer to the Antigravity plugin, mirroring the three-
layer wiring from feat/cursor-hooks-support, adapted for Antigravity's
native plugin and hook surfaces.

The wake hook (PreInvocation, invocationNum==1) was already the eager
layer — it injects verbatim palace content via injectSteps[].
ephemeralMessage before the first model call, which is strictly better
than Cursor's static directive. This commit adds the on-demand layers:

- integrations/shared/recall-protocol.md: single canonical source of
  truth for "search before answering", shared across Cursor, Antigravity,
  Claude Code, Codex, OpenClaw. Ported from feat/cursor-hooks-support
  with the wake-up step de-coupled from any IDE-specific hook name.

- .antigravity-plugin/skills/mempalace-recall/SKILL.md: recall-only
  skill with Protocol, Tool selection, Unhappy paths, and Anti-patterns
  sections. Tailored to Antigravity: references injectSteps injection,
  not Cursor's additional_context; links to shared protocol via GitHub
  URL (relative file paths break in the installed copy at
  ~/.gemini/config/plugins/mempalace/).

- .antigravity-plugin/rules/mempalace-recall.md: plain .md recall rule
  (no .mdc extension, no YAML frontmatter — per Antigravity's plugin
  docs which specify rules/<name>.md). Body mirrors Cursor's rule;
  references the shared protocol via absolute GitHub URL.

- hooks/antigravity/install.sh: creates skills/mempalace-recall/ and
  rules/ in the install dir, copies both new files (cmp-gated,
  idempotent). Verified: first run writes both, second run is silent.

- .antigravity-plugin/README.md: updated layout tree + "Three recall
  layers" section documenting wake hook (eager), recall skill
  (on-demand), and optional rule.

- 11 new tests in tests/test_antigravity_plugin_manifest.py covering:
  shared protocol presence, recall skill structure (frontmatter,
  required sections, GitHub URL reference), rule format (plain .md, no
  frontmatter), and installer (mkdir + copy_file lines present).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 13:09:40 +10:00

3.3 KiB

MemPalace — Antigravity plugin

In-repo packaging for the MemPalace integration with Google's Antigravity IDE.

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 so the skill and rule never drift.

Install

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 for the full user-facing guide and 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. See hooks/antigravity/INVESTIGATION.md for the full audit, including the surfaces deliberately not shipped.