{"owner":"MemPalace","repo":"mempalace","hasSkills":true,"totalSkillsCount":41,"totalTokensCount":25531,"categories":["anthropic-skill","root-instruction","claude-rule","mcp-config","plugin-manifest","marketplace","command-prompt"],"hasMcp":true,"mcpConfig":{"mcpServers":{"mempalace":{"command":"npx","args":["-y","@modelcontextprotocol/server-mempalace"]}}},"found":["skills/mempalace-task/SKILL.md","integrations/openclaw/SKILL.md",".antigravity-plugin/skills/mempalace-recall/SKILL.md",".antigravity-plugin/skills/mempalace/SKILL.md","skills/mempalace-recall/SKILL.md","skills/mempalace/SKILL.md",".claude-plugin/skills/mempalace-task/SKILL.md",".codex-plugin/skills/help/SKILL.md",".codex-plugin/skills/init/SKILL.md",".codex-plugin/skills/audit/SKILL.md",".claude-plugin/skills/mempalace/SKILL.md",".claude-plugin/skills/mempalace-recall/SKILL.md",".codex-plugin/skills/mine/SKILL.md",".codex-plugin/skills/search/SKILL.md",".codex-plugin/skills/status/SKILL.md","AGENTS.md","CLAUDE.md","mcp.json",".antigravity-plugin/plugin.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json",".codex-plugin/plugin.json",".cursor-plugin/marketplace.json",".cursor-plugin/mcp.json",".cursor-plugin/plugin.json","commands/mempalace-audit.md","commands/mempalace-help.md","commands/mempalace-init.md","commands/mempalace-mine.md","commands/mempalace-search.md","commands/mempalace-status.md","tools/save.md",".agents/plugins/marketplace.json",".antigravity-plugin/rules/mempalace-recall.md",".claude-plugin/commands/audit.md",".claude-plugin/commands/help.md",".claude-plugin/commands/init.md",".claude-plugin/commands/mine.md",".claude-plugin/commands/search.md",".claude-plugin/commands/status.md","examples/cursor/rules/README.md"],"skills":{"skills/mempalace-task/SKILL.md":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n","integrations/openclaw/SKILL.md":"---\nname: mempalace\ndescription: \"MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.\"\nversion: 3.12.0\nhomepage: https://github.com/MemPalace/mempalace\nuser-invocable: true\nmetadata:\n  openclaw:\n    emoji: \"\\U0001F3DB\"\n    os:\n      - darwin\n      - linux\n      - win32\n    requires:\n      anyBins:\n        - mempalace\n        - python3\n    install:\n      - id: mempalace-pip\n        kind: uv\n        label: \"Install MemPalace (Python, local ChromaDB)\"\n        package: mempalace\n        bins:\n          - mempalace\n---\n\n# MemPalace — Local AI Memory System\n\nYou have access to a local memory palace via MCP tools. The palace stores verbatim conversation history and a temporal knowledge graph — all on the user's machine, zero cloud, zero API calls.\n\n## Architecture\n\n- **Wings** = people or projects (e.g. `wing_alice`, `wing_myproject`)\n- **Halls** = categories (facts, events, preferences, advice)\n- **Rooms** = specific topics (e.g. `chromadb-setup`, `riley-school`)\n- **Drawers** = individual memory chunks (verbatim text)\n- **Knowledge Graph** = entity-relationship facts with time validity\n\n## Protocol — FOLLOW THIS EVERY SESSION\n\n1. **ON WAKE-UP**: Call `mempalace_status` to load palace overview and AAAK dialect spec.\n2. **BEFORE RESPONDING** about any person, project, or past event: use `mempalace_kg_query` for known relationships or time-bound facts, `mempalace_search` for source text, or `mempalace_diary_read` for recent agent continuity. Stop when answered; follow the canonical [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need). Never guess from memory — verify from the palace.\n3. **IF UNSURE** about a fact (name, age, relationship, preference): say \"let me check\" and query. Wrong is worse than slow.\n4. **AFTER EACH SESSION**: Call `mempalace_diary_write` to record what happened, what you learned, what matters.\n5. **WHEN FACTS CHANGE**: Call `mempalace_kg_invalidate` on the old fact, then `mempalace_kg_add` for the new one.\n\n## Available Tools\n\nFull MCP surface: 47 tools. Destructive or host-level tools are documented so\nyou know they exist, but use them only when the user explicitly asks or when a\ntool-specific workflow below says to.\n\n### Search & Browse\n- `mempalace_search` — Semantic search across memories for decisions, explanations, or source words.\n  - `query` (required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.\n  - `wing`: filter by wing\n  - `room`: filter by room\n  - `limit`: max results (default 5)\n- `mempalace_check_duplicate` — Check if content already exists before filing.\n  - `content` (required): text to check\n  - `threshold`: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)\n- `mempalace_status` — Palace overview: total drawers, wings, rooms, AAAK spec\n- `mempalace_list_wings` — All wings with drawer counts\n- `mempalace_list_rooms` — Rooms within a wing (optional wing filter)\n- `mempalace_list_drawers` — Paginated drawer listing\n  - `wing`, `room`: optional filters\n  - `since`: only drawers filed on/after this ISO date/time\n  - `before`: only drawers filed before this ISO date/time\n  - `limit`: max results (default 20)\n  - `offset`: pagination offset (default 0)\n- `mempalace_get_drawer` — Fetch a single drawer by ID. Returns full verbatim content and metadata.\n  - `drawer_id` (required)\n- `mempalace_get_taxonomy` — Full wing/room/count tree\n- `mempalace_get_aaak_spec` — Get AAAK compression dialect specification\n\n### Knowledge Graph (Temporal Facts)\n- `mempalace_kg_query` — Query entity relationships. Supports time filtering.\n  - `entity` (required): e.g. \"Max\", \"MyProject\"\n  - `as_of`: date filter (YYYY-MM-DD) — what was true at that time\n  - `direction`: \"outgoing\", \"incoming\", or \"both\" (default \"both\")\n- `mempalace_kg_add` — Add a fact: subject -> predicate -> object\n  - `subject`, `predicate`, `object` (required)\n  - `valid_from`: when this became true\n  - `source_closet`: source reference\n- `mempalace_kg_invalidate` — Mark a fact as no longer true\n  - `subject`, `predicate`, `object` (required)\n  - `ended`: when it stopped being true (default: today)\n- `mempalace_kg_timeline` — Chronological story of an entity\n  - `entity`: filter by entity name (optional — all events if omitted)\n- `mempalace_kg_stats` — Graph overview: entities, triples, relationship types\n\n### Palace Graph (Cross-Domain Connections)\n- `mempalace_traverse` — Walk from a room, find connected ideas across wings\n  - `start_room` (required): room to start from\n  - `max_hops`: connection depth (default 2)\n- `mempalace_find_tunnels` — Find rooms that bridge two wings via *implicit* overlap (rooms whose drawers naturally share content across wings — discovered, not declared)\n  - `wing_a`, `wing_b`: optional filters; omit both to scan all wing pairs\n- `mempalace_create_tunnel` — Create an *explicit* cross-wing tunnel: a user/agent-declared link between two locations. Use when you notice content in one project relates to another (e.g. API design in `project_api` connects to schema in `project_database`).\n  - `source_wing`, `source_room`, `target_wing`, `target_room` (required)\n  - `label`: short description of the relationship\n  - `source_drawer_id`, `target_drawer_id`: anchor to specific drawers\n- `mempalace_list_tunnels` — List all explicit tunnels, optionally filtered by wing\n  - `wing`: optional filter\n- `mempalace_delete_tunnel` — Remove an explicit tunnel by ID\n  - `tunnel_id` (required)\n- `mempalace_list_hallways` — List within-wing entity hallways (entity-to-entity co-occurrence links built at mine time)\n  - `wing`: optional filter\n- `mempalace_delete_hallway` — Remove a hallway record by ID\n  - `hallway_id` (required)\n- `mempalace_follow_tunnels` — From a room, follow explicit tunnels to connected drawers in other wings\n  - `wing`, `room` (required)\n- `mempalace_graph_stats` — Graph connectivity overview\n\n### Write\n- `mempalace_add_drawer` — Store verbatim content into a wing/room\n  - `wing`, `room`, `content` (required)\n  - `source_file`: optional source reference\n  - `added_by`: optional filing agent label\n  - Checks for duplicates automatically\n- `mempalace_checkpoint` — Save a whole session in one call: dedup each item, file non-duplicates, then write one diary entry\n  - `items` (required): array of `{wing, room, content}`; content must be verbatim\n  - `diary`: optional `{agent_name, entry, topic?, wing?}`; entry should use AAAK format\n  - `dedup_threshold`: similarity threshold (default 0.9)\n  - `added_by`: optional filing agent label (defaults to the diary `agent_name`, else `checkpoint`)\n- `mempalace_update_drawer` — Update an existing drawer's content and/or move it to a different wing/room\n  - `drawer_id` (required)\n  - `content`, `wing`, `room`: at least one must be provided (no-op otherwise)\n- `mempalace_delete_drawer` — Remove a drawer by ID\n  - `drawer_id` (required)\n\n### Ingest & Cleanup\n- `mempalace_mine` — Mine a directory into the palace, or one conversation file with `mode='convos'`. Host-level ingest; call only when the user asks to import files.\n  - `source` (required): directory to mine, or one conversation file with `mode='convos'`\n  - `mode`: `projects` (default), `convos`, or `extract`\n  - `wing`: target wing (default: source directory name)\n  - `agent`: recorded on every drawer (default `mempalace`)\n  - `limit`: max files to process (0 = all)\n  - `dry_run`: preview without writing\n  - `extract`: convos extraction strategy (`exchange` default, or `general`)\n- `mempalace_sync` — Prune drawers whose source files are gitignored, deleted, or moved. Use dry-run first.\n  - `project_dir`: optional project root scope\n  - `wing`: optional wing scope\n  - `apply`: actually delete; default is dry-run preview\n- `mempalace_delete_by_source` — Bulk-delete drawers with one exact `source_file`. Destructive; use dry-run first.\n  - `source_file` (required): exact metadata value to remove\n  - `dry_run`: preview match count and sample (default true)\n\n### Diary & Session\n- `mempalace_diary_write` — Write a session diary entry\n  - `agent_name` (required): your name/identifier\n  - `entry` (required): what happened, what you learned, what matters\n  - `topic`: category tag (default \"general\")\n- `mempalace_diary_read` — Read recent diary entries\n  - `agent_name` (required)\n  - `last_n`: number of entries (default 10)\n- `mempalace_memories_filed_away` — Acknowledge the latest silent auto-save checkpoint.\n  - Returns: how many messages were tucked into drawers since the last ack\n  - When to call: at the START of a session, to confirm prior-conversation persistence\n\n### System\n- `mempalace_hook_settings` — Get or set auto-save hook behavior. Host-level setting; do not change silently.\n  - `silent_save`: true saves directly without MCP-level clutter\n  - `desktop_toast`: true shows a desktop notification when saves complete\n- `mempalace_reconnect` — Force reconnect to the palace database after external writes or stale index state\n\n## Setup\n\nInstall MemPalace and populate the palace (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\nmempalace init ~/my-convos\nmempalace mine ~/my-convos\n```\n\n### OpenClaw MCP config\n\nAdd to your OpenClaw MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mempalace\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"mempalace.mcp_server\"]\n    }\n  }\n}\n```\n\nOr via CLI:\n\n```bash\nopenclaw mcp set mempalace '{\"command\":\"python3\",\"args\":[\"-m\",\"mempalace.mcp_server\"]}'\n```\n\n### Other MCP hosts\n\n```bash\n# Claude Code\nclaude mcp add mempalace -- python -m mempalace.mcp_server\n\n# Cursor — add to .cursor/mcp.json\n# Codex — add to .codex/mcp.json\n```\n\n## Tips\n\n- Search is semantic (meaning-based), not keyword. \"What did we discuss about database performance?\" works better than \"database\".\n- One empty KG query or filtered search does not prove the palace has nothing on this. Follow the query guide to check or widen the scope; if recall still finds nothing, state what was checked rather than inventing an answer.\n- The knowledge graph stores typed relationships with time windows. Use it for facts about people and projects — it knows WHEN things were true.\n- Diary entries accumulate across sessions. Write one at the end of each conversation to build continuity.\n- Use `mempalace_check_duplicate` before storing new content to avoid duplicates.\n- The AAAK dialect (from `mempalace_status`) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat *markers* as emotional context.\n\n## License\n\n[MemPalace](https://github.com/MemPalace/mempalace) is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.\n",".antigravity-plugin/skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill to set\nit up. Do not silently fall back to answering from model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, the MemPalace PreInvocation hook injects verbatim palace\n   content via `injectSteps[].ephemeralMessage` on the first model call\n   of a conversation. If memory was injected, start from it before\n   searching further.\n2. **Before responding** about people, projects, past events, or prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. **If unsure** about a fact (name, age, relationship, preference): say\n   \"let me check the palace\" and query. Wrong is worse than slow.\n4. **Return verbatim.** Quote the drawer's exact stored words. Never\n   summarize, paraphrase, or lossy-compress what the palace returns —\n   that is the whole point of the system.\n5. **After a substantive session**, record continuity with\n   `mempalace_diary_write` (background hooks may already do this — do not\n   double-file).\n6. **When a fact changes**, choose the operation that preserves temporal\n   history: use `mempalace_kg_supersede` for single-valued replacements\n   (model, employer, owner, address, current status),\n   `mempalace_kg_invalidate` for facts that ended without replacement,\n   and `mempalace_kg_add` for independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Antigravity\nrecall rule and the other integrations — lives in\n[`integrations/shared/recall-protocol.md`](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP unavailable / tool error.** Surface the error plainly and suggest\n  the user verify the server (`mempalace status`, or re-run the\n  installer `hooks/antigravity/install.sh`). Do not silently fall back\n  to guessing from model memory.\n- **Stale or conflicting facts.** Prefer the knowledge graph's\n  time-valid answer. Use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing stored content instead of quoting it\n  verbatim.\n- Searching reflexively on every turn, including pure greenfield coding\n  with no memory relevance.\n- Pasting the full conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Antigravity documentation: <https://antigravity.google/docs>\n- Agent Skills specification: <https://agentskills.io/specification>\n",".antigravity-plugin/skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: 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.\n---\n\n# MemPalace\n\nA searchable memory palace for AI — mine projects and conversations, then search them semantically. Verbatim storage, local-first, zero external API by default.\n\n## Prerequisites\n\nEnsure `mempalace` is installed:\n\n```bash\nmempalace --version\n```\n\nIf not installed (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\n```\n\n## Dynamic, version-correct instructions\n\nMemPalace exposes operation-specific instructions through the CLI so this skill stays accurate as MemPalace evolves. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nAlways 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.\n\n## Common operations\n\nThese are the six 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.\n\n### `help` — discover what MemPalace can do\n\n```bash\nmempalace instructions help\n```\n\nUse when the user is new, unsure what's possible, or asks \"what can you do\".\n\n### `init` — first-run setup of the palace\n\n```bash\nmempalace instructions init\n```\n\nUse when the user has just installed MemPalace, no palace exists yet, or the user explicitly asks to set up / configure / re-initialize their palace.\n\n### `mine` — ingest a project or conversation directory\n\n```bash\nmempalace instructions mine\n```\n\nUse 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.\n\n### `search` — find verbatim memories by semantic query\n\n```bash\nmempalace instructions search\n```\n\nUse when the user wants to recall something from the past, find a previous decision, or rediscover code/notes/conversations they already wrote.\n\n### `status` — what's in the palace right now\n\n```bash\nmempalace instructions status\n```\n\nUse when the user asks \"what's in my palace\", \"how big is my palace\", or wants a summary of wings, rooms, and drawer counts.\n\n### `audit` — how well organized the palace is, plus a repair session\n\n```bash\nmempalace instructions audit\n```\n\nUse when the user asks how well organized or \"messy\" the palace is, why a scoped search or wake-up misses things, or wants to clean up wings, rooms, tunnels, hallways, or the knowledge graph. Read-only until the user decides each repair.\n\n## MCP tools (preferred over CLI)\n\nInside 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.\n\nThe 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.\n\n## Design principles (verbatim from the project)\n\n- **Verbatim always** — never summarize, paraphrase, or lossy-compress user data.\n- **Local-first, zero external API by default** — extraction, embedding, and LLM-assisted refinement happen on the user's machine.\n- **Privacy by architecture** — the system never calls out to external services for core operations.\n- **Performance budgets** — hooks under 500ms; startup injection under 100ms.\n- **Background everything** — filing, indexing, and timestamps happen via hooks in the background; zero tokens spent on bookkeeping in the chat window.\n\nIf a request would violate any of these principles, refuse and explain — even if it would be technically convenient.\n\n## Release awareness\n\nRelease checks are opt-in. Ask before enabling weekly checks with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`,\nmatching the installation); the default is disabled. Enabling checks\ncontacts PyPI but sends no palace content, identity, or telemetry. When\n`mempalace_status` reports an available release, distinguish `updates.server`\nfrom a local proxy's `updates.client`. Use the local update plan only for the\nclient scope; a remote server update must be planned and authorized on the hub\nhost by its operator. Never install an update without explicit user authorization.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and deciding how to handle generic-room concentration on the\nnext mine. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n","skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n","skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n",".claude-plugin/skills/mempalace-task/SKILL.md":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n",".codex-plugin/skills/help/SKILL.md":"---\nname: help\ndescription: Show MemPalace help — available commands, usage tips, and getting started guidance.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Help\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions help\n```\n",".codex-plugin/skills/init/SKILL.md":"---\nname: init\ndescription: Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.\nallowed-tools: Bash, Read, Write, Edit\n---\n\n# MemPalace Init\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions init\n```\n",".codex-plugin/skills/audit/SKILL.md":"---\nname: audit\ndescription: Score how well organized the MemPalace palace is, then run a guided repair session — one decision at a time.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Audit\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions audit\n```\n",".claude-plugin/skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n",".claude-plugin/skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n",".codex-plugin/skills/mine/SKILL.md":"# mine\n\nPath: `.codex-plugin/skills/mine/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/mine/SKILL.md)",".codex-plugin/skills/search/SKILL.md":"# search\n\nPath: `.codex-plugin/skills/search/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/search/SKILL.md)",".codex-plugin/skills/status/SKILL.md":"# status\n\nPath: `.codex-plugin/skills/status/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/status/SKILL.md)","AGENTS.md":"# AI Agent Protocol & Instructions\n\nPath: `AGENTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/AGENTS.md)","CLAUDE.md":"# Claude Agent Guidelines & System Prompt\n\nPath: `CLAUDE.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/CLAUDE.md)","mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/mcp.json)",".antigravity-plugin/plugin.json":"# antigravity-plugin Plugin Manifest\n\nPath: `.antigravity-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/plugin.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/plugin.json)",".codex-plugin/plugin.json":"# codex-plugin Plugin Manifest\n\nPath: `.codex-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/plugin.json)",".cursor-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.cursor-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/marketplace.json)",".cursor-plugin/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor-plugin/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/mcp.json)",".cursor-plugin/plugin.json":"# cursor-plugin Plugin Manifest\n\nPath: `.cursor-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/plugin.json)","commands/mempalace-audit.md":"# Command: /mempalace-audit\n\nPath: `commands/mempalace-audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-audit.md)","commands/mempalace-help.md":"# Command: /mempalace-help\n\nPath: `commands/mempalace-help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-help.md)","commands/mempalace-init.md":"# Command: /mempalace-init\n\nPath: `commands/mempalace-init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-init.md)","commands/mempalace-mine.md":"# Command: /mempalace-mine\n\nPath: `commands/mempalace-mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-mine.md)","commands/mempalace-search.md":"# Command: /mempalace-search\n\nPath: `commands/mempalace-search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-search.md)","commands/mempalace-status.md":"# Command: /mempalace-status\n\nPath: `commands/mempalace-status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-status.md)","tools/save.md":"# Tools Skill\n\nPath: `tools/save.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/tools/save.md)",".agents/plugins/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.agents/plugins/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.agents/plugins/marketplace.json)",".antigravity-plugin/rules/mempalace-recall.md":"# Rules Skill\n\nPath: `.antigravity-plugin/rules/mempalace-recall.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/rules/mempalace-recall.md)",".claude-plugin/commands/audit.md":"# Command: /audit\n\nPath: `.claude-plugin/commands/audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/audit.md)",".claude-plugin/commands/help.md":"# Command: /help\n\nPath: `.claude-plugin/commands/help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/help.md)",".claude-plugin/commands/init.md":"# Command: /init\n\nPath: `.claude-plugin/commands/init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/init.md)",".claude-plugin/commands/mine.md":"# Command: /mine\n\nPath: `.claude-plugin/commands/mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/mine.md)",".claude-plugin/commands/search.md":"# Command: /search\n\nPath: `.claude-plugin/commands/search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/search.md)",".claude-plugin/commands/status.md":"# Command: /status\n\nPath: `.claude-plugin/commands/status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/status.md)","examples/cursor/rules/README.md":"# Rules Skill\n\nPath: `examples/cursor/rules/README.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/examples/cursor/rules/README.md)"},"files":{"skills/mempalace-task/SKILL.md":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n","integrations/openclaw/SKILL.md":"---\nname: mempalace\ndescription: \"MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.\"\nversion: 3.12.0\nhomepage: https://github.com/MemPalace/mempalace\nuser-invocable: true\nmetadata:\n  openclaw:\n    emoji: \"\\U0001F3DB\"\n    os:\n      - darwin\n      - linux\n      - win32\n    requires:\n      anyBins:\n        - mempalace\n        - python3\n    install:\n      - id: mempalace-pip\n        kind: uv\n        label: \"Install MemPalace (Python, local ChromaDB)\"\n        package: mempalace\n        bins:\n          - mempalace\n---\n\n# MemPalace — Local AI Memory System\n\nYou have access to a local memory palace via MCP tools. The palace stores verbatim conversation history and a temporal knowledge graph — all on the user's machine, zero cloud, zero API calls.\n\n## Architecture\n\n- **Wings** = people or projects (e.g. `wing_alice`, `wing_myproject`)\n- **Halls** = categories (facts, events, preferences, advice)\n- **Rooms** = specific topics (e.g. `chromadb-setup`, `riley-school`)\n- **Drawers** = individual memory chunks (verbatim text)\n- **Knowledge Graph** = entity-relationship facts with time validity\n\n## Protocol — FOLLOW THIS EVERY SESSION\n\n1. **ON WAKE-UP**: Call `mempalace_status` to load palace overview and AAAK dialect spec.\n2. **BEFORE RESPONDING** about any person, project, or past event: use `mempalace_kg_query` for known relationships or time-bound facts, `mempalace_search` for source text, or `mempalace_diary_read` for recent agent continuity. Stop when answered; follow the canonical [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need). Never guess from memory — verify from the palace.\n3. **IF UNSURE** about a fact (name, age, relationship, preference): say \"let me check\" and query. Wrong is worse than slow.\n4. **AFTER EACH SESSION**: Call `mempalace_diary_write` to record what happened, what you learned, what matters.\n5. **WHEN FACTS CHANGE**: Call `mempalace_kg_invalidate` on the old fact, then `mempalace_kg_add` for the new one.\n\n## Available Tools\n\nFull MCP surface: 47 tools. Destructive or host-level tools are documented so\nyou know they exist, but use them only when the user explicitly asks or when a\ntool-specific workflow below says to.\n\n### Search & Browse\n- `mempalace_search` — Semantic search across memories for decisions, explanations, or source words.\n  - `query` (required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.\n  - `wing`: filter by wing\n  - `room`: filter by room\n  - `limit`: max results (default 5)\n- `mempalace_check_duplicate` — Check if content already exists before filing.\n  - `content` (required): text to check\n  - `threshold`: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)\n- `mempalace_status` — Palace overview: total drawers, wings, rooms, AAAK spec\n- `mempalace_list_wings` — All wings with drawer counts\n- `mempalace_list_rooms` — Rooms within a wing (optional wing filter)\n- `mempalace_list_drawers` — Paginated drawer listing\n  - `wing`, `room`: optional filters\n  - `since`: only drawers filed on/after this ISO date/time\n  - `before`: only drawers filed before this ISO date/time\n  - `limit`: max results (default 20)\n  - `offset`: pagination offset (default 0)\n- `mempalace_get_drawer` — Fetch a single drawer by ID. Returns full verbatim content and metadata.\n  - `drawer_id` (required)\n- `mempalace_get_taxonomy` — Full wing/room/count tree\n- `mempalace_get_aaak_spec` — Get AAAK compression dialect specification\n\n### Knowledge Graph (Temporal Facts)\n- `mempalace_kg_query` — Query entity relationships. Supports time filtering.\n  - `entity` (required): e.g. \"Max\", \"MyProject\"\n  - `as_of`: date filter (YYYY-MM-DD) — what was true at that time\n  - `direction`: \"outgoing\", \"incoming\", or \"both\" (default \"both\")\n- `mempalace_kg_add` — Add a fact: subject -> predicate -> object\n  - `subject`, `predicate`, `object` (required)\n  - `valid_from`: when this became true\n  - `source_closet`: source reference\n- `mempalace_kg_invalidate` — Mark a fact as no longer true\n  - `subject`, `predicate`, `object` (required)\n  - `ended`: when it stopped being true (default: today)\n- `mempalace_kg_timeline` — Chronological story of an entity\n  - `entity`: filter by entity name (optional — all events if omitted)\n- `mempalace_kg_stats` — Graph overview: entities, triples, relationship types\n\n### Palace Graph (Cross-Domain Connections)\n- `mempalace_traverse` — Walk from a room, find connected ideas across wings\n  - `start_room` (required): room to start from\n  - `max_hops`: connection depth (default 2)\n- `mempalace_find_tunnels` — Find rooms that bridge two wings via *implicit* overlap (rooms whose drawers naturally share content across wings — discovered, not declared)\n  - `wing_a`, `wing_b`: optional filters; omit both to scan all wing pairs\n- `mempalace_create_tunnel` — Create an *explicit* cross-wing tunnel: a user/agent-declared link between two locations. Use when you notice content in one project relates to another (e.g. API design in `project_api` connects to schema in `project_database`).\n  - `source_wing`, `source_room`, `target_wing`, `target_room` (required)\n  - `label`: short description of the relationship\n  - `source_drawer_id`, `target_drawer_id`: anchor to specific drawers\n- `mempalace_list_tunnels` — List all explicit tunnels, optionally filtered by wing\n  - `wing`: optional filter\n- `mempalace_delete_tunnel` — Remove an explicit tunnel by ID\n  - `tunnel_id` (required)\n- `mempalace_list_hallways` — List within-wing entity hallways (entity-to-entity co-occurrence links built at mine time)\n  - `wing`: optional filter\n- `mempalace_delete_hallway` — Remove a hallway record by ID\n  - `hallway_id` (required)\n- `mempalace_follow_tunnels` — From a room, follow explicit tunnels to connected drawers in other wings\n  - `wing`, `room` (required)\n- `mempalace_graph_stats` — Graph connectivity overview\n\n### Write\n- `mempalace_add_drawer` — Store verbatim content into a wing/room\n  - `wing`, `room`, `content` (required)\n  - `source_file`: optional source reference\n  - `added_by`: optional filing agent label\n  - Checks for duplicates automatically\n- `mempalace_checkpoint` — Save a whole session in one call: dedup each item, file non-duplicates, then write one diary entry\n  - `items` (required): array of `{wing, room, content}`; content must be verbatim\n  - `diary`: optional `{agent_name, entry, topic?, wing?}`; entry should use AAAK format\n  - `dedup_threshold`: similarity threshold (default 0.9)\n  - `added_by`: optional filing agent label (defaults to the diary `agent_name`, else `checkpoint`)\n- `mempalace_update_drawer` — Update an existing drawer's content and/or move it to a different wing/room\n  - `drawer_id` (required)\n  - `content`, `wing`, `room`: at least one must be provided (no-op otherwise)\n- `mempalace_delete_drawer` — Remove a drawer by ID\n  - `drawer_id` (required)\n\n### Ingest & Cleanup\n- `mempalace_mine` — Mine a directory into the palace, or one conversation file with `mode='convos'`. Host-level ingest; call only when the user asks to import files.\n  - `source` (required): directory to mine, or one conversation file with `mode='convos'`\n  - `mode`: `projects` (default), `convos`, or `extract`\n  - `wing`: target wing (default: source directory name)\n  - `agent`: recorded on every drawer (default `mempalace`)\n  - `limit`: max files to process (0 = all)\n  - `dry_run`: preview without writing\n  - `extract`: convos extraction strategy (`exchange` default, or `general`)\n- `mempalace_sync` — Prune drawers whose source files are gitignored, deleted, or moved. Use dry-run first.\n  - `project_dir`: optional project root scope\n  - `wing`: optional wing scope\n  - `apply`: actually delete; default is dry-run preview\n- `mempalace_delete_by_source` — Bulk-delete drawers with one exact `source_file`. Destructive; use dry-run first.\n  - `source_file` (required): exact metadata value to remove\n  - `dry_run`: preview match count and sample (default true)\n\n### Diary & Session\n- `mempalace_diary_write` — Write a session diary entry\n  - `agent_name` (required): your name/identifier\n  - `entry` (required): what happened, what you learned, what matters\n  - `topic`: category tag (default \"general\")\n- `mempalace_diary_read` — Read recent diary entries\n  - `agent_name` (required)\n  - `last_n`: number of entries (default 10)\n- `mempalace_memories_filed_away` — Acknowledge the latest silent auto-save checkpoint.\n  - Returns: how many messages were tucked into drawers since the last ack\n  - When to call: at the START of a session, to confirm prior-conversation persistence\n\n### System\n- `mempalace_hook_settings` — Get or set auto-save hook behavior. Host-level setting; do not change silently.\n  - `silent_save`: true saves directly without MCP-level clutter\n  - `desktop_toast`: true shows a desktop notification when saves complete\n- `mempalace_reconnect` — Force reconnect to the palace database after external writes or stale index state\n\n## Setup\n\nInstall MemPalace and populate the palace (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\nmempalace init ~/my-convos\nmempalace mine ~/my-convos\n```\n\n### OpenClaw MCP config\n\nAdd to your OpenClaw MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mempalace\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"mempalace.mcp_server\"]\n    }\n  }\n}\n```\n\nOr via CLI:\n\n```bash\nopenclaw mcp set mempalace '{\"command\":\"python3\",\"args\":[\"-m\",\"mempalace.mcp_server\"]}'\n```\n\n### Other MCP hosts\n\n```bash\n# Claude Code\nclaude mcp add mempalace -- python -m mempalace.mcp_server\n\n# Cursor — add to .cursor/mcp.json\n# Codex — add to .codex/mcp.json\n```\n\n## Tips\n\n- Search is semantic (meaning-based), not keyword. \"What did we discuss about database performance?\" works better than \"database\".\n- One empty KG query or filtered search does not prove the palace has nothing on this. Follow the query guide to check or widen the scope; if recall still finds nothing, state what was checked rather than inventing an answer.\n- The knowledge graph stores typed relationships with time windows. Use it for facts about people and projects — it knows WHEN things were true.\n- Diary entries accumulate across sessions. Write one at the end of each conversation to build continuity.\n- Use `mempalace_check_duplicate` before storing new content to avoid duplicates.\n- The AAAK dialect (from `mempalace_status`) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat *markers* as emotional context.\n\n## License\n\n[MemPalace](https://github.com/MemPalace/mempalace) is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.\n",".antigravity-plugin/skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill to set\nit up. Do not silently fall back to answering from model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, the MemPalace PreInvocation hook injects verbatim palace\n   content via `injectSteps[].ephemeralMessage` on the first model call\n   of a conversation. If memory was injected, start from it before\n   searching further.\n2. **Before responding** about people, projects, past events, or prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. **If unsure** about a fact (name, age, relationship, preference): say\n   \"let me check the palace\" and query. Wrong is worse than slow.\n4. **Return verbatim.** Quote the drawer's exact stored words. Never\n   summarize, paraphrase, or lossy-compress what the palace returns —\n   that is the whole point of the system.\n5. **After a substantive session**, record continuity with\n   `mempalace_diary_write` (background hooks may already do this — do not\n   double-file).\n6. **When a fact changes**, choose the operation that preserves temporal\n   history: use `mempalace_kg_supersede` for single-valued replacements\n   (model, employer, owner, address, current status),\n   `mempalace_kg_invalidate` for facts that ended without replacement,\n   and `mempalace_kg_add` for independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Antigravity\nrecall rule and the other integrations — lives in\n[`integrations/shared/recall-protocol.md`](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP unavailable / tool error.** Surface the error plainly and suggest\n  the user verify the server (`mempalace status`, or re-run the\n  installer `hooks/antigravity/install.sh`). Do not silently fall back\n  to guessing from model memory.\n- **Stale or conflicting facts.** Prefer the knowledge graph's\n  time-valid answer. Use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing stored content instead of quoting it\n  verbatim.\n- Searching reflexively on every turn, including pure greenfield coding\n  with no memory relevance.\n- Pasting the full conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Antigravity documentation: <https://antigravity.google/docs>\n- Agent Skills specification: <https://agentskills.io/specification>\n",".antigravity-plugin/skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: 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.\n---\n\n# MemPalace\n\nA searchable memory palace for AI — mine projects and conversations, then search them semantically. Verbatim storage, local-first, zero external API by default.\n\n## Prerequisites\n\nEnsure `mempalace` is installed:\n\n```bash\nmempalace --version\n```\n\nIf not installed (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\n```\n\n## Dynamic, version-correct instructions\n\nMemPalace exposes operation-specific instructions through the CLI so this skill stays accurate as MemPalace evolves. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nAlways 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.\n\n## Common operations\n\nThese are the six 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.\n\n### `help` — discover what MemPalace can do\n\n```bash\nmempalace instructions help\n```\n\nUse when the user is new, unsure what's possible, or asks \"what can you do\".\n\n### `init` — first-run setup of the palace\n\n```bash\nmempalace instructions init\n```\n\nUse when the user has just installed MemPalace, no palace exists yet, or the user explicitly asks to set up / configure / re-initialize their palace.\n\n### `mine` — ingest a project or conversation directory\n\n```bash\nmempalace instructions mine\n```\n\nUse 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.\n\n### `search` — find verbatim memories by semantic query\n\n```bash\nmempalace instructions search\n```\n\nUse when the user wants to recall something from the past, find a previous decision, or rediscover code/notes/conversations they already wrote.\n\n### `status` — what's in the palace right now\n\n```bash\nmempalace instructions status\n```\n\nUse when the user asks \"what's in my palace\", \"how big is my palace\", or wants a summary of wings, rooms, and drawer counts.\n\n### `audit` — how well organized the palace is, plus a repair session\n\n```bash\nmempalace instructions audit\n```\n\nUse when the user asks how well organized or \"messy\" the palace is, why a scoped search or wake-up misses things, or wants to clean up wings, rooms, tunnels, hallways, or the knowledge graph. Read-only until the user decides each repair.\n\n## MCP tools (preferred over CLI)\n\nInside 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.\n\nThe 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.\n\n## Design principles (verbatim from the project)\n\n- **Verbatim always** — never summarize, paraphrase, or lossy-compress user data.\n- **Local-first, zero external API by default** — extraction, embedding, and LLM-assisted refinement happen on the user's machine.\n- **Privacy by architecture** — the system never calls out to external services for core operations.\n- **Performance budgets** — hooks under 500ms; startup injection under 100ms.\n- **Background everything** — filing, indexing, and timestamps happen via hooks in the background; zero tokens spent on bookkeeping in the chat window.\n\nIf a request would violate any of these principles, refuse and explain — even if it would be technically convenient.\n\n## Release awareness\n\nRelease checks are opt-in. Ask before enabling weekly checks with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`,\nmatching the installation); the default is disabled. Enabling checks\ncontacts PyPI but sends no palace content, identity, or telemetry. When\n`mempalace_status` reports an available release, distinguish `updates.server`\nfrom a local proxy's `updates.client`. Use the local update plan only for the\nclient scope; a remote server update must be planned and authorized on the hub\nhost by its operator. Never install an update without explicit user authorization.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and deciding how to handle generic-room concentration on the\nnext mine. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n","skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n","skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n",".claude-plugin/skills/mempalace-task/SKILL.md":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n",".codex-plugin/skills/help/SKILL.md":"---\nname: help\ndescription: Show MemPalace help — available commands, usage tips, and getting started guidance.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Help\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions help\n```\n",".codex-plugin/skills/init/SKILL.md":"---\nname: init\ndescription: Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.\nallowed-tools: Bash, Read, Write, Edit\n---\n\n# MemPalace Init\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions init\n```\n",".codex-plugin/skills/audit/SKILL.md":"---\nname: audit\ndescription: Score how well organized the MemPalace palace is, then run a guided repair session — one decision at a time.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Audit\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions audit\n```\n",".claude-plugin/skills/mempalace/SKILL.md":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n",".claude-plugin/skills/mempalace-recall/SKILL.md":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n",".codex-plugin/skills/mine/SKILL.md":"# mine\n\nPath: `.codex-plugin/skills/mine/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/mine/SKILL.md)",".codex-plugin/skills/search/SKILL.md":"# search\n\nPath: `.codex-plugin/skills/search/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/search/SKILL.md)",".codex-plugin/skills/status/SKILL.md":"# status\n\nPath: `.codex-plugin/skills/status/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/status/SKILL.md)","AGENTS.md":"# AI Agent Protocol & Instructions\n\nPath: `AGENTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/AGENTS.md)","CLAUDE.md":"# Claude Agent Guidelines & System Prompt\n\nPath: `CLAUDE.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/CLAUDE.md)","mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/mcp.json)",".antigravity-plugin/plugin.json":"# antigravity-plugin Plugin Manifest\n\nPath: `.antigravity-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/plugin.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/plugin.json)",".codex-plugin/plugin.json":"# codex-plugin Plugin Manifest\n\nPath: `.codex-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/plugin.json)",".cursor-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.cursor-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/marketplace.json)",".cursor-plugin/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor-plugin/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/mcp.json)",".cursor-plugin/plugin.json":"# cursor-plugin Plugin Manifest\n\nPath: `.cursor-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/plugin.json)","commands/mempalace-audit.md":"# Command: /mempalace-audit\n\nPath: `commands/mempalace-audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-audit.md)","commands/mempalace-help.md":"# Command: /mempalace-help\n\nPath: `commands/mempalace-help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-help.md)","commands/mempalace-init.md":"# Command: /mempalace-init\n\nPath: `commands/mempalace-init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-init.md)","commands/mempalace-mine.md":"# Command: /mempalace-mine\n\nPath: `commands/mempalace-mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-mine.md)","commands/mempalace-search.md":"# Command: /mempalace-search\n\nPath: `commands/mempalace-search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-search.md)","commands/mempalace-status.md":"# Command: /mempalace-status\n\nPath: `commands/mempalace-status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-status.md)","tools/save.md":"# Tools Skill\n\nPath: `tools/save.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/tools/save.md)",".agents/plugins/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.agents/plugins/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.agents/plugins/marketplace.json)",".antigravity-plugin/rules/mempalace-recall.md":"# Rules Skill\n\nPath: `.antigravity-plugin/rules/mempalace-recall.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/rules/mempalace-recall.md)",".claude-plugin/commands/audit.md":"# Command: /audit\n\nPath: `.claude-plugin/commands/audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/audit.md)",".claude-plugin/commands/help.md":"# Command: /help\n\nPath: `.claude-plugin/commands/help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/help.md)",".claude-plugin/commands/init.md":"# Command: /init\n\nPath: `.claude-plugin/commands/init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/init.md)",".claude-plugin/commands/mine.md":"# Command: /mine\n\nPath: `.claude-plugin/commands/mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/mine.md)",".claude-plugin/commands/search.md":"# Command: /search\n\nPath: `.claude-plugin/commands/search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/search.md)",".claude-plugin/commands/status.md":"# Command: /status\n\nPath: `.claude-plugin/commands/status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/status.md)","examples/cursor/rules/README.md":"# Rules Skill\n\nPath: `examples/cursor/rules/README.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/examples/cursor/rules/README.md)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# AI Agent Protocol & Instructions\n\nPath: `AGENTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/AGENTS.md)","tokens":300,"sizeBytes":153},{"name":"mempalace-recall.md","path":".antigravity-plugin/rules/mempalace-recall.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/rules/mempalace-recall.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# Rules Skill\n\nPath: `.antigravity-plugin/rules/mempalace-recall.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/rules/mempalace-recall.md)","tokens":300,"sizeBytes":204},{"name":"SKILL.md","path":".antigravity-plugin/skills/mempalace-recall/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/skills/mempalace-recall/SKILL.md","title":"mempalace-recall","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill to set\nit up. Do not silently fall back to answering from model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, the MemPalace PreInvocation hook injects verbatim palace\n   content via `injectSteps[].ephemeralMessage` on the first model call\n   of a conversation. If memory was injected, start from it before\n   searching further.\n2. **Before responding** about people, projects, past events, or prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. **If unsure** about a fact (name, age, relationship, preference): say\n   \"let me check the palace\" and query. Wrong is worse than slow.\n4. **Return verbatim.** Quote the drawer's exact stored words. Never\n   summarize, paraphrase, or lossy-compress what the palace returns —\n   that is the whole point of the system.\n5. **After a substantive session**, record continuity with\n   `mempalace_diary_write` (background hooks may already do this — do not\n   double-file).\n6. **When a fact changes**, choose the operation that preserves temporal\n   history: use `mempalace_kg_supersede` for single-valued replacements\n   (model, employer, owner, address, current status),\n   `mempalace_kg_invalidate` for facts that ended without replacement,\n   and `mempalace_kg_add` for independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Antigravity\nrecall rule and the other integrations — lives in\n[`integrations/shared/recall-protocol.md`](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP unavailable / tool error.** Surface the error plainly and suggest\n  the user verify the server (`mempalace status`, or re-run the\n  installer `hooks/antigravity/install.sh`). Do not silently fall back\n  to guessing from model memory.\n- **Stale or conflicting facts.** Prefer the knowledge graph's\n  time-valid answer. Use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing stored content instead of quoting it\n  verbatim.\n- Searching reflexively on every turn, including pure greenfield coding\n  with no memory relevance.\n- Pasting the full conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Antigravity documentation: <https://antigravity.google/docs>\n- Agent Skills specification: <https://agentskills.io/specification>\n","frontmatter":{"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."},"isInternal":false,"tokens":1526,"sizeBytes":6278},{"name":"SKILL.md","path":".antigravity-plugin/skills/mempalace/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/skills/mempalace/SKILL.md","title":"mempalace","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace\ndescription: 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.\n---\n\n# MemPalace\n\nA searchable memory palace for AI — mine projects and conversations, then search them semantically. Verbatim storage, local-first, zero external API by default.\n\n## Prerequisites\n\nEnsure `mempalace` is installed:\n\n```bash\nmempalace --version\n```\n\nIf not installed (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\n```\n\n## Dynamic, version-correct instructions\n\nMemPalace exposes operation-specific instructions through the CLI so this skill stays accurate as MemPalace evolves. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nAlways 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.\n\n## Common operations\n\nThese are the six 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.\n\n### `help` — discover what MemPalace can do\n\n```bash\nmempalace instructions help\n```\n\nUse when the user is new, unsure what's possible, or asks \"what can you do\".\n\n### `init` — first-run setup of the palace\n\n```bash\nmempalace instructions init\n```\n\nUse when the user has just installed MemPalace, no palace exists yet, or the user explicitly asks to set up / configure / re-initialize their palace.\n\n### `mine` — ingest a project or conversation directory\n\n```bash\nmempalace instructions mine\n```\n\nUse 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.\n\n### `search` — find verbatim memories by semantic query\n\n```bash\nmempalace instructions search\n```\n\nUse when the user wants to recall something from the past, find a previous decision, or rediscover code/notes/conversations they already wrote.\n\n### `status` — what's in the palace right now\n\n```bash\nmempalace instructions status\n```\n\nUse when the user asks \"what's in my palace\", \"how big is my palace\", or wants a summary of wings, rooms, and drawer counts.\n\n### `audit` — how well organized the palace is, plus a repair session\n\n```bash\nmempalace instructions audit\n```\n\nUse when the user asks how well organized or \"messy\" the palace is, why a scoped search or wake-up misses things, or wants to clean up wings, rooms, tunnels, hallways, or the knowledge graph. Read-only until the user decides each repair.\n\n## MCP tools (preferred over CLI)\n\nInside 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.\n\nThe 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.\n\n## Design principles (verbatim from the project)\n\n- **Verbatim always** — never summarize, paraphrase, or lossy-compress user data.\n- **Local-first, zero external API by default** — extraction, embedding, and LLM-assisted refinement happen on the user's machine.\n- **Privacy by architecture** — the system never calls out to external services for core operations.\n- **Performance budgets** — hooks under 500ms; startup injection under 100ms.\n- **Background everything** — filing, indexing, and timestamps happen via hooks in the background; zero tokens spent on bookkeeping in the chat window.\n\nIf a request would violate any of these principles, refuse and explain — even if it would be technically convenient.\n\n## Release awareness\n\nRelease checks are opt-in. Ask before enabling weekly checks with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`,\nmatching the installation); the default is disabled. Enabling checks\ncontacts PyPI but sends no palace content, identity, or telemetry. When\n`mempalace_status` reports an available release, distinguish `updates.server`\nfrom a local proxy's `updates.client`. Use the local update plan only for the\nclient scope; a remote server update must be planned and authorized on the hub\nhost by its operator. Never install an update without explicit user authorization.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and deciding how to handle generic-room concentration on the\nnext mine. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n","frontmatter":{"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."},"isInternal":false,"tokens":1269,"sizeBytes":5712},{"name":"SKILL.md","path":".claude-plugin/skills/mempalace-recall/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/skills/mempalace-recall/SKILL.md","title":"mempalace-recall","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n","frontmatter":{"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."},"isInternal":false,"tokens":1699,"sizeBytes":6892},{"name":"SKILL.md","path":".claude-plugin/skills/mempalace-task/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/skills/mempalace-task/SKILL.md","title":"mempalace-task","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n","frontmatter":{"name":"mempalace-task","description":"Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode."},"isInternal":false,"tokens":1715,"sizeBytes":7432},{"name":"SKILL.md","path":".claude-plugin/skills/mempalace/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/skills/mempalace/SKILL.md","title":"mempalace","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n","frontmatter":{"name":"mempalace","description":"Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness."},"isInternal":false,"tokens":2055,"sizeBytes":8647},{"name":"SKILL.md","path":".codex-plugin/skills/audit/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/audit/SKILL.md","title":"audit","category":"anthropic-skill","format":"markdown","content":"---\nname: audit\ndescription: Score how well organized the MemPalace palace is, then run a guided repair session — one decision at a time.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Audit\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions audit\n```\n","frontmatter":{"name":"audit","description":"Score how well organized the MemPalace palace is, then run a guided repair session — one decision at a time.","allowed-tools":"Bash, Read","allowedTools":["Bash,","Read"]},"allowedTools":["Bash,","Read"],"isInternal":false,"tokens":70,"sizeBytes":309},{"name":"SKILL.md","path":".codex-plugin/skills/help/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/help/SKILL.md","title":"help","category":"anthropic-skill","format":"markdown","content":"---\nname: help\ndescription: Show MemPalace help — available commands, usage tips, and getting started guidance.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Help\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions help\n```\n","frontmatter":{"name":"help","description":"Show MemPalace help — available commands, usage tips, and getting started guidance.","allowed-tools":"Bash, Read","allowedTools":["Bash,","Read"]},"allowedTools":["Bash,","Read"],"isInternal":false,"tokens":63,"sizeBytes":281},{"name":"SKILL.md","path":".codex-plugin/skills/init/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/init/SKILL.md","title":"init","category":"anthropic-skill","format":"markdown","content":"---\nname: init\ndescription: Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.\nallowed-tools: Bash, Read, Write, Edit\n---\n\n# MemPalace Init\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions init\n```\n","frontmatter":{"name":"init","description":"Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.","allowed-tools":"Bash, Read, Write, Edit","allowedTools":["Bash,","Read,","Write,","Edit"]},"allowedTools":["Bash,","Read,","Write,","Edit"],"isInternal":false,"tokens":70,"sizeBytes":301},{"name":"SKILL.md","path":".codex-plugin/skills/mine/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/mine/SKILL.md","title":"mine","category":"anthropic-skill","format":"markdown","content":"# mine\n\nPath: `.codex-plugin/skills/mine/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/mine/SKILL.md)","tokens":300,"sizeBytes":175},{"name":"SKILL.md","path":".codex-plugin/skills/search/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/search/SKILL.md","title":"search","category":"anthropic-skill","format":"markdown","content":"# search\n\nPath: `.codex-plugin/skills/search/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/search/SKILL.md)","tokens":300,"sizeBytes":181},{"name":"SKILL.md","path":".codex-plugin/skills/status/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/status/SKILL.md","title":"status","category":"anthropic-skill","format":"markdown","content":"# status\n\nPath: `.codex-plugin/skills/status/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/status/SKILL.md)","tokens":300,"sizeBytes":181},{"name":"README.md","path":"examples/cursor/rules/README.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/examples/cursor/rules/README.md","title":"Rules Skill","category":"anthropic-skill","format":"markdown","content":"# Rules Skill\n\nPath: `examples/cursor/rules/README.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/examples/cursor/rules/README.md)","tokens":300,"sizeBytes":176},{"name":"SKILL.md","path":"integrations/openclaw/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/integrations/openclaw/SKILL.md","title":"mempalace","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace\ndescription: \"MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.\"\nversion: 3.12.0\nhomepage: https://github.com/MemPalace/mempalace\nuser-invocable: true\nmetadata:\n  openclaw:\n    emoji: \"\\U0001F3DB\"\n    os:\n      - darwin\n      - linux\n      - win32\n    requires:\n      anyBins:\n        - mempalace\n        - python3\n    install:\n      - id: mempalace-pip\n        kind: uv\n        label: \"Install MemPalace (Python, local ChromaDB)\"\n        package: mempalace\n        bins:\n          - mempalace\n---\n\n# MemPalace — Local AI Memory System\n\nYou have access to a local memory palace via MCP tools. The palace stores verbatim conversation history and a temporal knowledge graph — all on the user's machine, zero cloud, zero API calls.\n\n## Architecture\n\n- **Wings** = people or projects (e.g. `wing_alice`, `wing_myproject`)\n- **Halls** = categories (facts, events, preferences, advice)\n- **Rooms** = specific topics (e.g. `chromadb-setup`, `riley-school`)\n- **Drawers** = individual memory chunks (verbatim text)\n- **Knowledge Graph** = entity-relationship facts with time validity\n\n## Protocol — FOLLOW THIS EVERY SESSION\n\n1. **ON WAKE-UP**: Call `mempalace_status` to load palace overview and AAAK dialect spec.\n2. **BEFORE RESPONDING** about any person, project, or past event: use `mempalace_kg_query` for known relationships or time-bound facts, `mempalace_search` for source text, or `mempalace_diary_read` for recent agent continuity. Stop when answered; follow the canonical [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need). Never guess from memory — verify from the palace.\n3. **IF UNSURE** about a fact (name, age, relationship, preference): say \"let me check\" and query. Wrong is worse than slow.\n4. **AFTER EACH SESSION**: Call `mempalace_diary_write` to record what happened, what you learned, what matters.\n5. **WHEN FACTS CHANGE**: Call `mempalace_kg_invalidate` on the old fact, then `mempalace_kg_add` for the new one.\n\n## Available Tools\n\nFull MCP surface: 47 tools. Destructive or host-level tools are documented so\nyou know they exist, but use them only when the user explicitly asks or when a\ntool-specific workflow below says to.\n\n### Search & Browse\n- `mempalace_search` — Semantic search across memories for decisions, explanations, or source words.\n  - `query` (required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.\n  - `wing`: filter by wing\n  - `room`: filter by room\n  - `limit`: max results (default 5)\n- `mempalace_check_duplicate` — Check if content already exists before filing.\n  - `content` (required): text to check\n  - `threshold`: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)\n- `mempalace_status` — Palace overview: total drawers, wings, rooms, AAAK spec\n- `mempalace_list_wings` — All wings with drawer counts\n- `mempalace_list_rooms` — Rooms within a wing (optional wing filter)\n- `mempalace_list_drawers` — Paginated drawer listing\n  - `wing`, `room`: optional filters\n  - `since`: only drawers filed on/after this ISO date/time\n  - `before`: only drawers filed before this ISO date/time\n  - `limit`: max results (default 20)\n  - `offset`: pagination offset (default 0)\n- `mempalace_get_drawer` — Fetch a single drawer by ID. Returns full verbatim content and metadata.\n  - `drawer_id` (required)\n- `mempalace_get_taxonomy` — Full wing/room/count tree\n- `mempalace_get_aaak_spec` — Get AAAK compression dialect specification\n\n### Knowledge Graph (Temporal Facts)\n- `mempalace_kg_query` — Query entity relationships. Supports time filtering.\n  - `entity` (required): e.g. \"Max\", \"MyProject\"\n  - `as_of`: date filter (YYYY-MM-DD) — what was true at that time\n  - `direction`: \"outgoing\", \"incoming\", or \"both\" (default \"both\")\n- `mempalace_kg_add` — Add a fact: subject -> predicate -> object\n  - `subject`, `predicate`, `object` (required)\n  - `valid_from`: when this became true\n  - `source_closet`: source reference\n- `mempalace_kg_invalidate` — Mark a fact as no longer true\n  - `subject`, `predicate`, `object` (required)\n  - `ended`: when it stopped being true (default: today)\n- `mempalace_kg_timeline` — Chronological story of an entity\n  - `entity`: filter by entity name (optional — all events if omitted)\n- `mempalace_kg_stats` — Graph overview: entities, triples, relationship types\n\n### Palace Graph (Cross-Domain Connections)\n- `mempalace_traverse` — Walk from a room, find connected ideas across wings\n  - `start_room` (required): room to start from\n  - `max_hops`: connection depth (default 2)\n- `mempalace_find_tunnels` — Find rooms that bridge two wings via *implicit* overlap (rooms whose drawers naturally share content across wings — discovered, not declared)\n  - `wing_a`, `wing_b`: optional filters; omit both to scan all wing pairs\n- `mempalace_create_tunnel` — Create an *explicit* cross-wing tunnel: a user/agent-declared link between two locations. Use when you notice content in one project relates to another (e.g. API design in `project_api` connects to schema in `project_database`).\n  - `source_wing`, `source_room`, `target_wing`, `target_room` (required)\n  - `label`: short description of the relationship\n  - `source_drawer_id`, `target_drawer_id`: anchor to specific drawers\n- `mempalace_list_tunnels` — List all explicit tunnels, optionally filtered by wing\n  - `wing`: optional filter\n- `mempalace_delete_tunnel` — Remove an explicit tunnel by ID\n  - `tunnel_id` (required)\n- `mempalace_list_hallways` — List within-wing entity hallways (entity-to-entity co-occurrence links built at mine time)\n  - `wing`: optional filter\n- `mempalace_delete_hallway` — Remove a hallway record by ID\n  - `hallway_id` (required)\n- `mempalace_follow_tunnels` — From a room, follow explicit tunnels to connected drawers in other wings\n  - `wing`, `room` (required)\n- `mempalace_graph_stats` — Graph connectivity overview\n\n### Write\n- `mempalace_add_drawer` — Store verbatim content into a wing/room\n  - `wing`, `room`, `content` (required)\n  - `source_file`: optional source reference\n  - `added_by`: optional filing agent label\n  - Checks for duplicates automatically\n- `mempalace_checkpoint` — Save a whole session in one call: dedup each item, file non-duplicates, then write one diary entry\n  - `items` (required): array of `{wing, room, content}`; content must be verbatim\n  - `diary`: optional `{agent_name, entry, topic?, wing?}`; entry should use AAAK format\n  - `dedup_threshold`: similarity threshold (default 0.9)\n  - `added_by`: optional filing agent label (defaults to the diary `agent_name`, else `checkpoint`)\n- `mempalace_update_drawer` — Update an existing drawer's content and/or move it to a different wing/room\n  - `drawer_id` (required)\n  - `content`, `wing`, `room`: at least one must be provided (no-op otherwise)\n- `mempalace_delete_drawer` — Remove a drawer by ID\n  - `drawer_id` (required)\n\n### Ingest & Cleanup\n- `mempalace_mine` — Mine a directory into the palace, or one conversation file with `mode='convos'`. Host-level ingest; call only when the user asks to import files.\n  - `source` (required): directory to mine, or one conversation file with `mode='convos'`\n  - `mode`: `projects` (default), `convos`, or `extract`\n  - `wing`: target wing (default: source directory name)\n  - `agent`: recorded on every drawer (default `mempalace`)\n  - `limit`: max files to process (0 = all)\n  - `dry_run`: preview without writing\n  - `extract`: convos extraction strategy (`exchange` default, or `general`)\n- `mempalace_sync` — Prune drawers whose source files are gitignored, deleted, or moved. Use dry-run first.\n  - `project_dir`: optional project root scope\n  - `wing`: optional wing scope\n  - `apply`: actually delete; default is dry-run preview\n- `mempalace_delete_by_source` — Bulk-delete drawers with one exact `source_file`. Destructive; use dry-run first.\n  - `source_file` (required): exact metadata value to remove\n  - `dry_run`: preview match count and sample (default true)\n\n### Diary & Session\n- `mempalace_diary_write` — Write a session diary entry\n  - `agent_name` (required): your name/identifier\n  - `entry` (required): what happened, what you learned, what matters\n  - `topic`: category tag (default \"general\")\n- `mempalace_diary_read` — Read recent diary entries\n  - `agent_name` (required)\n  - `last_n`: number of entries (default 10)\n- `mempalace_memories_filed_away` — Acknowledge the latest silent auto-save checkpoint.\n  - Returns: how many messages were tucked into drawers since the last ack\n  - When to call: at the START of a session, to confirm prior-conversation persistence\n\n### System\n- `mempalace_hook_settings` — Get or set auto-save hook behavior. Host-level setting; do not change silently.\n  - `silent_save`: true saves directly without MCP-level clutter\n  - `desktop_toast`: true shows a desktop notification when saves complete\n- `mempalace_reconnect` — Force reconnect to the palace database after external writes or stale index state\n\n## Setup\n\nInstall MemPalace and populate the palace (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\nmempalace init ~/my-convos\nmempalace mine ~/my-convos\n```\n\n### OpenClaw MCP config\n\nAdd to your OpenClaw MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mempalace\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"mempalace.mcp_server\"]\n    }\n  }\n}\n```\n\nOr via CLI:\n\n```bash\nopenclaw mcp set mempalace '{\"command\":\"python3\",\"args\":[\"-m\",\"mempalace.mcp_server\"]}'\n```\n\n### Other MCP hosts\n\n```bash\n# Claude Code\nclaude mcp add mempalace -- python -m mempalace.mcp_server\n\n# Cursor — add to .cursor/mcp.json\n# Codex — add to .codex/mcp.json\n```\n\n## Tips\n\n- Search is semantic (meaning-based), not keyword. \"What did we discuss about database performance?\" works better than \"database\".\n- One empty KG query or filtered search does not prove the palace has nothing on this. Follow the query guide to check or widen the scope; if recall still finds nothing, state what was checked rather than inventing an answer.\n- The knowledge graph stores typed relationships with time windows. Use it for facts about people and projects — it knows WHEN things were true.\n- Diary entries accumulate across sessions. Write one at the end of each conversation to build continuity.\n- Use `mempalace_check_duplicate` before storing new content to avoid duplicates.\n- The AAAK dialect (from `mempalace_status`) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat *markers* as emotional context.\n\n## License\n\n[MemPalace](https://github.com/MemPalace/mempalace) is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.\n","frontmatter":{"name":"mempalace","description":"MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.","version":"3.12.0","homepage":"https://github.com/MemPalace/mempalace","user-invocable":true,"metadata":{"openclaw":{"emoji":"🏛","os":["darwin","linux","win32"],"requires":{"anyBins":["mempalace","python3"]},"install":[{"id":"mempalace-pip","kind":"uv","label":"Install MemPalace (Python, local ChromaDB)","package":"mempalace","bins":["mempalace"]}]}}},"isInternal":false,"tokens":2895,"sizeBytes":11056},{"name":"SKILL.md","path":"skills/mempalace-recall/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/skills/mempalace-recall/SKILL.md","title":"mempalace-recall","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n","frontmatter":{"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."},"isInternal":false,"tokens":1699,"sizeBytes":6892},{"name":"SKILL.md","path":"skills/mempalace-task/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/skills/mempalace-task/SKILL.md","title":"mempalace-task","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n","frontmatter":{"name":"mempalace-task","description":"Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode."},"isInternal":false,"tokens":1715,"sizeBytes":7432},{"name":"SKILL.md","path":"skills/mempalace/SKILL.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/skills/mempalace/SKILL.md","title":"mempalace","category":"anthropic-skill","format":"markdown","content":"---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n","frontmatter":{"name":"mempalace","description":"Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness."},"isInternal":false,"tokens":2055,"sizeBytes":8647},{"name":"save.md","path":"tools/save.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/tools/save.md","title":"Tools Skill","category":"anthropic-skill","format":"markdown","content":"# Tools Skill\n\nPath: `tools/save.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/tools/save.md)","tokens":300,"sizeBytes":140},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# Claude Agent Guidelines & System Prompt\n\nPath: `CLAUDE.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/CLAUDE.md)","tokens":300,"sizeBytes":160},{"name":"marketplace.json","path":".agents/plugins/marketplace.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.agents/plugins/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.agents/plugins/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.agents/plugins/marketplace.json)","tokens":300,"sizeBytes":200},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":198},{"name":"marketplace.json","path":".cursor-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.cursor-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/marketplace.json)","tokens":300,"sizeBytes":198},{"name":"plugin.json","path":".antigravity-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/plugin.json","title":"antigravity-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# antigravity-plugin Plugin Manifest\n\nPath: `.antigravity-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/plugin.json)","tokens":300,"sizeBytes":199},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":184},{"name":"plugin.json","path":".codex-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/plugin.json","title":"codex-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# codex-plugin Plugin Manifest\n\nPath: `.codex-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/plugin.json)","tokens":300,"sizeBytes":181},{"name":"plugin.json","path":".cursor-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/plugin.json","title":"cursor-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# cursor-plugin Plugin Manifest\n\nPath: `.cursor-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/plugin.json)","tokens":300,"sizeBytes":184},{"name":"mcp.json","path":".cursor-plugin/mcp.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor-plugin/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/mcp.json)","tokens":300,"sizeBytes":191},{"name":"mcp.json","path":"mcp.json","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/mcp.json)","tokens":300,"sizeBytes":161},{"name":"audit.md","path":".claude-plugin/commands/audit.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/audit.md","title":"Command: /audit","category":"command-prompt","format":"markdown","content":"# Command: /audit\n\nPath: `.claude-plugin/commands/audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/audit.md)","tokens":300,"sizeBytes":182},{"name":"help.md","path":".claude-plugin/commands/help.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/help.md","title":"Command: /help","category":"command-prompt","format":"markdown","content":"# Command: /help\n\nPath: `.claude-plugin/commands/help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/help.md)","tokens":300,"sizeBytes":179},{"name":"init.md","path":".claude-plugin/commands/init.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/init.md","title":"Command: /init","category":"command-prompt","format":"markdown","content":"# Command: /init\n\nPath: `.claude-plugin/commands/init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/init.md)","tokens":300,"sizeBytes":179},{"name":"mine.md","path":".claude-plugin/commands/mine.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/mine.md","title":"Command: /mine","category":"command-prompt","format":"markdown","content":"# Command: /mine\n\nPath: `.claude-plugin/commands/mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/mine.md)","tokens":300,"sizeBytes":179},{"name":"search.md","path":".claude-plugin/commands/search.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/search.md","title":"Command: /search","category":"command-prompt","format":"markdown","content":"# Command: /search\n\nPath: `.claude-plugin/commands/search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/search.md)","tokens":300,"sizeBytes":185},{"name":"status.md","path":".claude-plugin/commands/status.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/status.md","title":"Command: /status","category":"command-prompt","format":"markdown","content":"# Command: /status\n\nPath: `.claude-plugin/commands/status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/status.md)","tokens":300,"sizeBytes":185},{"name":"mempalace-audit.md","path":"commands/mempalace-audit.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-audit.md","title":"Command: /mempalace-audit","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-audit\n\nPath: `commands/mempalace-audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-audit.md)","tokens":300,"sizeBytes":182},{"name":"mempalace-help.md","path":"commands/mempalace-help.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-help.md","title":"Command: /mempalace-help","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-help\n\nPath: `commands/mempalace-help.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-help.md)","tokens":300,"sizeBytes":179},{"name":"mempalace-init.md","path":"commands/mempalace-init.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-init.md","title":"Command: /mempalace-init","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-init\n\nPath: `commands/mempalace-init.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-init.md)","tokens":300,"sizeBytes":179},{"name":"mempalace-mine.md","path":"commands/mempalace-mine.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-mine.md","title":"Command: /mempalace-mine","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-mine\n\nPath: `commands/mempalace-mine.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-mine.md)","tokens":300,"sizeBytes":179},{"name":"mempalace-search.md","path":"commands/mempalace-search.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-search.md","title":"Command: /mempalace-search","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-search\n\nPath: `commands/mempalace-search.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-search.md)","tokens":300,"sizeBytes":185},{"name":"mempalace-status.md","path":"commands/mempalace-status.md","rawUrl":"https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-status.md","title":"Command: /mempalace-status","category":"command-prompt","format":"markdown","content":"# Command: /mempalace-status\n\nPath: `commands/mempalace-status.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/commands/mempalace-status.md)","tokens":300,"sizeBytes":185}],"systemPromptSnippet":"<yakaai_skills repo=\"MemPalace/mempalace\">\n<!-- File: AGENTS.md (Tokens: ~300 | Category: root-instruction) -->\n# AI Agent Protocol & Instructions\n\nPath: `AGENTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/AGENTS.md)\n\n<!-- File: .antigravity-plugin/rules/mempalace-recall.md (Tokens: ~300 | Category: anthropic-skill) -->\n# Rules Skill\n\nPath: `.antigravity-plugin/rules/mempalace-recall.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/rules/mempalace-recall.md)\n\n<!-- File: .antigravity-plugin/skills/mempalace-recall/SKILL.md (Tokens: ~1526 | Category: anthropic-skill) -->\n---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill to set\nit up. Do not silently fall back to answering from model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, the MemPalace PreInvocation hook injects verbatim palace\n   content via `injectSteps[].ephemeralMessage` on the first model call\n   of a conversation. If memory was injected, start from it before\n   searching further.\n2. **Before responding** about people, projects, past events, or prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. **If unsure** about a fact (name, age, relationship, preference): say\n   \"let me check the palace\" and query. Wrong is worse than slow.\n4. **Return verbatim.** Quote the drawer's exact stored words. Never\n   summarize, paraphrase, or lossy-compress what the palace returns —\n   that is the whole point of the system.\n5. **After a substantive session**, record continuity with\n   `mempalace_diary_write` (background hooks may already do this — do not\n   double-file).\n6. **When a fact changes**, choose the operation that preserves temporal\n   history: use `mempalace_kg_supersede` for single-valued replacements\n   (model, employer, owner, address, current status),\n   `mempalace_kg_invalidate` for facts that ended without replacement,\n   and `mempalace_kg_add` for independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Antigravity\nrecall rule and the other integrations — lives in\n[`integrations/shared/recall-protocol.md`](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP unavailable / tool error.** Surface the error plainly and suggest\n  the user verify the server (`mempalace status`, or re-run the\n  installer `hooks/antigravity/install.sh`). Do not silently fall back\n  to guessing from model memory.\n- **Stale or conflicting facts.** Prefer the knowledge graph's\n  time-valid answer. Use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing stored content instead of quoting it\n  verbatim.\n- Searching reflexively on every turn, including pure greenfield coding\n  with no memory relevance.\n- Pasting the full conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Antigravity documentation: <https://antigravity.google/docs>\n- Agent Skills specification: <https://agentskills.io/specification>\n\n<!-- File: .antigravity-plugin/skills/mempalace/SKILL.md (Tokens: ~1269 | Category: anthropic-skill) -->\n---\nname: mempalace\ndescription: 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.\n---\n\n# MemPalace\n\nA searchable memory palace for AI — mine projects and conversations, then search them semantically. Verbatim storage, local-first, zero external API by default.\n\n## Prerequisites\n\nEnsure `mempalace` is installed:\n\n```bash\nmempalace --version\n```\n\nIf not installed (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\n```\n\n## Dynamic, version-correct instructions\n\nMemPalace exposes operation-specific instructions through the CLI so this skill stays accurate as MemPalace evolves. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nAlways 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.\n\n## Common operations\n\nThese are the six 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.\n\n### `help` — discover what MemPalace can do\n\n```bash\nmempalace instructions help\n```\n\nUse when the user is new, unsure what's possible, or asks \"what can you do\".\n\n### `init` — first-run setup of the palace\n\n```bash\nmempalace instructions init\n```\n\nUse when the user has just installed MemPalace, no palace exists yet, or the user explicitly asks to set up / configure / re-initialize their palace.\n\n### `mine` — ingest a project or conversation directory\n\n```bash\nmempalace instructions mine\n```\n\nUse 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.\n\n### `search` — find verbatim memories by semantic query\n\n```bash\nmempalace instructions search\n```\n\nUse when the user wants to recall something from the past, find a previous decision, or rediscover code/notes/conversations they already wrote.\n\n### `status` — what's in the palace right now\n\n```bash\nmempalace instructions status\n```\n\nUse when the user asks \"what's in my palace\", \"how big is my palace\", or wants a summary of wings, rooms, and drawer counts.\n\n### `audit` — how well organized the palace is, plus a repair session\n\n```bash\nmempalace instructions audit\n```\n\nUse when the user asks how well organized or \"messy\" the palace is, why a scoped search or wake-up misses things, or wants to clean up wings, rooms, tunnels, hallways, or the knowledge graph. Read-only until the user decides each repair.\n\n## MCP tools (preferred over CLI)\n\nInside 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.\n\nThe 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.\n\n## Design principles (verbatim from the project)\n\n- **Verbatim always** — never summarize, paraphrase, or lossy-compress user data.\n- **Local-first, zero external API by default** — extraction, embedding, and LLM-assisted refinement happen on the user's machine.\n- **Privacy by architecture** — the system never calls out to external services for core operations.\n- **Performance budgets** — hooks under 500ms; startup injection under 100ms.\n- **Background everything** — filing, indexing, and timestamps happen via hooks in the background; zero tokens spent on bookkeeping in the chat window.\n\nIf a request would violate any of these principles, refuse and explain — even if it would be technically convenient.\n\n## Release awareness\n\nRelease checks are opt-in. Ask before enabling weekly checks with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`,\nmatching the installation); the default is disabled. Enabling checks\ncontacts PyPI but sends no palace content, identity, or telemetry. When\n`mempalace_status` reports an available release, distinguish `updates.server`\nfrom a local proxy's `updates.client`. Use the local update plan only for the\nclient scope; a remote server update must be planned and authorized on the hub\nhost by its operator. Never install an update without explicit user authorization.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and deciding how to handle generic-room concentration on the\nnext mine. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n<!-- File: .claude-plugin/skills/mempalace-recall/SKILL.md (Tokens: ~1699 | Category: anthropic-skill) -->\n---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n\n<!-- File: .claude-plugin/skills/mempalace-task/SKILL.md (Tokens: ~1715 | Category: anthropic-skill) -->\n---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n\n<!-- File: .claude-plugin/skills/mempalace/SKILL.md (Tokens: ~2055 | Category: anthropic-skill) -->\n---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n\n<!-- File: .codex-plugin/skills/audit/SKILL.md (Tokens: ~70 | Category: anthropic-skill) -->\n---\nname: audit\ndescription: Score how well organized the MemPalace palace is, then run a guided repair session — one decision at a time.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Audit\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions audit\n```\n\n<!-- File: .codex-plugin/skills/help/SKILL.md (Tokens: ~63 | Category: anthropic-skill) -->\n---\nname: help\ndescription: Show MemPalace help — available commands, usage tips, and getting started guidance.\nallowed-tools: Bash, Read\n---\n\n# MemPalace Help\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions help\n```\n\n<!-- File: .codex-plugin/skills/init/SKILL.md (Tokens: ~70 | Category: anthropic-skill) -->\n---\nname: init\ndescription: Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.\nallowed-tools: Bash, Read, Write, Edit\n---\n\n# MemPalace Init\n\nRun the following command and follow the returned instructions step by step:\n\n```bash\nmempalace instructions init\n```\n\n<!-- File: .codex-plugin/skills/mine/SKILL.md (Tokens: ~300 | Category: anthropic-skill) -->\n# mine\n\nPath: `.codex-plugin/skills/mine/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/mine/SKILL.md)\n\n<!-- File: .codex-plugin/skills/search/SKILL.md (Tokens: ~300 | Category: anthropic-skill) -->\n# search\n\nPath: `.codex-plugin/skills/search/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/search/SKILL.md)\n\n<!-- File: .codex-plugin/skills/status/SKILL.md (Tokens: ~300 | Category: anthropic-skill) -->\n# status\n\nPath: `.codex-plugin/skills/status/SKILL.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/skills/status/SKILL.md)\n\n<!-- File: examples/cursor/rules/README.md (Tokens: ~300 | Category: anthropic-skill) -->\n# Rules Skill\n\nPath: `examples/cursor/rules/README.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/examples/cursor/rules/README.md)\n\n<!-- File: integrations/openclaw/SKILL.md (Tokens: ~2895 | Category: anthropic-skill) -->\n---\nname: mempalace\ndescription: \"MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.\"\nversion: 3.12.0\nhomepage: https://github.com/MemPalace/mempalace\nuser-invocable: true\nmetadata:\n  openclaw:\n    emoji: \"\\U0001F3DB\"\n    os:\n      - darwin\n      - linux\n      - win32\n    requires:\n      anyBins:\n        - mempalace\n        - python3\n    install:\n      - id: mempalace-pip\n        kind: uv\n        label: \"Install MemPalace (Python, local ChromaDB)\"\n        package: mempalace\n        bins:\n          - mempalace\n---\n\n# MemPalace — Local AI Memory System\n\nYou have access to a local memory palace via MCP tools. The palace stores verbatim conversation history and a temporal knowledge graph — all on the user's machine, zero cloud, zero API calls.\n\n## Architecture\n\n- **Wings** = people or projects (e.g. `wing_alice`, `wing_myproject`)\n- **Halls** = categories (facts, events, preferences, advice)\n- **Rooms** = specific topics (e.g. `chromadb-setup`, `riley-school`)\n- **Drawers** = individual memory chunks (verbatim text)\n- **Knowledge Graph** = entity-relationship facts with time validity\n\n## Protocol — FOLLOW THIS EVERY SESSION\n\n1. **ON WAKE-UP**: Call `mempalace_status` to load palace overview and AAAK dialect spec.\n2. **BEFORE RESPONDING** about any person, project, or past event: use `mempalace_kg_query` for known relationships or time-bound facts, `mempalace_search` for source text, or `mempalace_diary_read` for recent agent continuity. Stop when answered; follow the canonical [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need). Never guess from memory — verify from the palace.\n3. **IF UNSURE** about a fact (name, age, relationship, preference): say \"let me check\" and query. Wrong is worse than slow.\n4. **AFTER EACH SESSION**: Call `mempalace_diary_write` to record what happened, what you learned, what matters.\n5. **WHEN FACTS CHANGE**: Call `mempalace_kg_invalidate` on the old fact, then `mempalace_kg_add` for the new one.\n\n## Available Tools\n\nFull MCP surface: 47 tools. Destructive or host-level tools are documented so\nyou know they exist, but use them only when the user explicitly asks or when a\ntool-specific workflow below says to.\n\n### Search & Browse\n- `mempalace_search` — Semantic search across memories for decisions, explanations, or source words.\n  - `query` (required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.\n  - `wing`: filter by wing\n  - `room`: filter by room\n  - `limit`: max results (default 5)\n- `mempalace_check_duplicate` — Check if content already exists before filing.\n  - `content` (required): text to check\n  - `threshold`: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)\n- `mempalace_status` — Palace overview: total drawers, wings, rooms, AAAK spec\n- `mempalace_list_wings` — All wings with drawer counts\n- `mempalace_list_rooms` — Rooms within a wing (optional wing filter)\n- `mempalace_list_drawers` — Paginated drawer listing\n  - `wing`, `room`: optional filters\n  - `since`: only drawers filed on/after this ISO date/time\n  - `before`: only drawers filed before this ISO date/time\n  - `limit`: max results (default 20)\n  - `offset`: pagination offset (default 0)\n- `mempalace_get_drawer` — Fetch a single drawer by ID. Returns full verbatim content and metadata.\n  - `drawer_id` (required)\n- `mempalace_get_taxonomy` — Full wing/room/count tree\n- `mempalace_get_aaak_spec` — Get AAAK compression dialect specification\n\n### Knowledge Graph (Temporal Facts)\n- `mempalace_kg_query` — Query entity relationships. Supports time filtering.\n  - `entity` (required): e.g. \"Max\", \"MyProject\"\n  - `as_of`: date filter (YYYY-MM-DD) — what was true at that time\n  - `direction`: \"outgoing\", \"incoming\", or \"both\" (default \"both\")\n- `mempalace_kg_add` — Add a fact: subject -> predicate -> object\n  - `subject`, `predicate`, `object` (required)\n  - `valid_from`: when this became true\n  - `source_closet`: source reference\n- `mempalace_kg_invalidate` — Mark a fact as no longer true\n  - `subject`, `predicate`, `object` (required)\n  - `ended`: when it stopped being true (default: today)\n- `mempalace_kg_timeline` — Chronological story of an entity\n  - `entity`: filter by entity name (optional — all events if omitted)\n- `mempalace_kg_stats` — Graph overview: entities, triples, relationship types\n\n### Palace Graph (Cross-Domain Connections)\n- `mempalace_traverse` — Walk from a room, find connected ideas across wings\n  - `start_room` (required): room to start from\n  - `max_hops`: connection depth (default 2)\n- `mempalace_find_tunnels` — Find rooms that bridge two wings via *implicit* overlap (rooms whose drawers naturally share content across wings — discovered, not declared)\n  - `wing_a`, `wing_b`: optional filters; omit both to scan all wing pairs\n- `mempalace_create_tunnel` — Create an *explicit* cross-wing tunnel: a user/agent-declared link between two locations. Use when you notice content in one project relates to another (e.g. API design in `project_api` connects to schema in `project_database`).\n  - `source_wing`, `source_room`, `target_wing`, `target_room` (required)\n  - `label`: short description of the relationship\n  - `source_drawer_id`, `target_drawer_id`: anchor to specific drawers\n- `mempalace_list_tunnels` — List all explicit tunnels, optionally filtered by wing\n  - `wing`: optional filter\n- `mempalace_delete_tunnel` — Remove an explicit tunnel by ID\n  - `tunnel_id` (required)\n- `mempalace_list_hallways` — List within-wing entity hallways (entity-to-entity co-occurrence links built at mine time)\n  - `wing`: optional filter\n- `mempalace_delete_hallway` — Remove a hallway record by ID\n  - `hallway_id` (required)\n- `mempalace_follow_tunnels` — From a room, follow explicit tunnels to connected drawers in other wings\n  - `wing`, `room` (required)\n- `mempalace_graph_stats` — Graph connectivity overview\n\n### Write\n- `mempalace_add_drawer` — Store verbatim content into a wing/room\n  - `wing`, `room`, `content` (required)\n  - `source_file`: optional source reference\n  - `added_by`: optional filing agent label\n  - Checks for duplicates automatically\n- `mempalace_checkpoint` — Save a whole session in one call: dedup each item, file non-duplicates, then write one diary entry\n  - `items` (required): array of `{wing, room, content}`; content must be verbatim\n  - `diary`: optional `{agent_name, entry, topic?, wing?}`; entry should use AAAK format\n  - `dedup_threshold`: similarity threshold (default 0.9)\n  - `added_by`: optional filing agent label (defaults to the diary `agent_name`, else `checkpoint`)\n- `mempalace_update_drawer` — Update an existing drawer's content and/or move it to a different wing/room\n  - `drawer_id` (required)\n  - `content`, `wing`, `room`: at least one must be provided (no-op otherwise)\n- `mempalace_delete_drawer` — Remove a drawer by ID\n  - `drawer_id` (required)\n\n### Ingest & Cleanup\n- `mempalace_mine` — Mine a directory into the palace, or one conversation file with `mode='convos'`. Host-level ingest; call only when the user asks to import files.\n  - `source` (required): directory to mine, or one conversation file with `mode='convos'`\n  - `mode`: `projects` (default), `convos`, or `extract`\n  - `wing`: target wing (default: source directory name)\n  - `agent`: recorded on every drawer (default `mempalace`)\n  - `limit`: max files to process (0 = all)\n  - `dry_run`: preview without writing\n  - `extract`: convos extraction strategy (`exchange` default, or `general`)\n- `mempalace_sync` — Prune drawers whose source files are gitignored, deleted, or moved. Use dry-run first.\n  - `project_dir`: optional project root scope\n  - `wing`: optional wing scope\n  - `apply`: actually delete; default is dry-run preview\n- `mempalace_delete_by_source` — Bulk-delete drawers with one exact `source_file`. Destructive; use dry-run first.\n  - `source_file` (required): exact metadata value to remove\n  - `dry_run`: preview match count and sample (default true)\n\n### Diary & Session\n- `mempalace_diary_write` — Write a session diary entry\n  - `agent_name` (required): your name/identifier\n  - `entry` (required): what happened, what you learned, what matters\n  - `topic`: category tag (default \"general\")\n- `mempalace_diary_read` — Read recent diary entries\n  - `agent_name` (required)\n  - `last_n`: number of entries (default 10)\n- `mempalace_memories_filed_away` — Acknowledge the latest silent auto-save checkpoint.\n  - Returns: how many messages were tucked into drawers since the last ack\n  - When to call: at the START of a session, to confirm prior-conversation persistence\n\n### System\n- `mempalace_hook_settings` — Get or set auto-save hook behavior. Host-level setting; do not change silently.\n  - `silent_save`: true saves directly without MCP-level clutter\n  - `desktop_toast`: true shows a desktop notification when saves complete\n- `mempalace_reconnect` — Force reconnect to the palace database after external writes or stale index state\n\n## Setup\n\nInstall MemPalace and populate the palace (uv recommended):\n\n```bash\nuv tool install mempalace   # or: pip install mempalace\nmempalace init ~/my-convos\nmempalace mine ~/my-convos\n```\n\n### OpenClaw MCP config\n\nAdd to your OpenClaw MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mempalace\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"mempalace.mcp_server\"]\n    }\n  }\n}\n```\n\nOr via CLI:\n\n```bash\nopenclaw mcp set mempalace '{\"command\":\"python3\",\"args\":[\"-m\",\"mempalace.mcp_server\"]}'\n```\n\n### Other MCP hosts\n\n```bash\n# Claude Code\nclaude mcp add mempalace -- python -m mempalace.mcp_server\n\n# Cursor — add to .cursor/mcp.json\n# Codex — add to .codex/mcp.json\n```\n\n## Tips\n\n- Search is semantic (meaning-based), not keyword. \"What did we discuss about database performance?\" works better than \"database\".\n- One empty KG query or filtered search does not prove the palace has nothing on this. Follow the query guide to check or widen the scope; if recall still finds nothing, state what was checked rather than inventing an answer.\n- The knowledge graph stores typed relationships with time windows. Use it for facts about people and projects — it knows WHEN things were true.\n- Diary entries accumulate across sessions. Write one at the end of each conversation to build continuity.\n- Use `mempalace_check_duplicate` before storing new content to avoid duplicates.\n- The AAAK dialect (from `mempalace_status`) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat *markers* as emotional context.\n\n## License\n\n[MemPalace](https://github.com/MemPalace/mempalace) is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.\n\n<!-- File: skills/mempalace-recall/SKILL.md (Tokens: ~1699 | Category: anthropic-skill) -->\n---\nname: mempalace-recall\ndescription: \"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.\"\n---\n\n# MemPalace Recall\n\nSearch-before-answer protocol for MemPalace. This skill makes the agent\nread the user's memory palace before answering anything that may already\nbe filed there, instead of guessing from model memory. It complements\nthe `mempalace` skill, which covers install / mine / status; this one\ncovers recall only.\n\n## Step 0 — Verify MemPalace is available\n\nBefore relying on recall, confirm MemPalace is installed and reachable:\n\n- Official release page: <https://github.com/MemPalace/mempalace/releases>\n- Check installed: `mempalace --version`\n- Do not assume a version — the MCP tool set is the source of truth for\n  what this installed build supports.\n\nIf the `mempalace_*` MCP tools are not available, tell the user the\nserver is not connected and point them at the `mempalace` skill or\n`/mempalace-init` to set it up. Do not silently fall back to answering\nfrom model memory.\n\n## Identity\n\nAct as a senior AI-memory systems engineer with decades of experience\nbuilding verbatim recall, semantic retrieval, and temporal knowledge\ngraphs. Verbatim recall from the palace always beats a confident guess\nfrom model memory — wrong is worse than slow.\n\n## When to recall\n\nSearch the palace **before answering** whenever the user asks about\nsomething that may already be filed:\n\n- Past work or prior decisions — \"what did we decide / try / do?\"\n- A person, project, or entity — \"who is …\", \"what is …\"\n- An earlier session — \"remember when …\", \"last time …\", \"the thing we\n  discussed\"\n- A preference, fact, or relationship that could have changed over time\n\nDo **not** search on pure greenfield work with no memory relevance\n(e.g. \"rename this variable\", \"fix this typo\"). Recall is\nquestion-driven, not reflexive — a search on every turn wastes latency\nand violates MemPalace's \"memory should feel instant\" budget.\n\n## Protocol\n\n1. On wake-up, if a session-start hook injected `additional_context`,\n   honour its wing scoping.\n2. Before responding about people / projects / past events / prior\n   decisions: use `mempalace_kg_query` for known relationships or time-bound\n   facts, `mempalace_search` for source text, or `mempalace_diary_read` for\n   recent agent continuity. Stop when answered; follow the canonical\n   [query guide](https://github.com/MemPalace/mempalace/blob/develop/integrations/shared/recall-protocol.md#retrieve-only-the-context-you-need).\n3. If unsure about a fact: say \"let me check the palace\" and query.\n4. Return the drawer's **verbatim** text. Never summarize or paraphrase\n   stored content — quoting the exact words is the point of the system.\n5. After a substantive session, record continuity with\n   `mempalace_diary_write` (skip if a background hook already saved).\n6. When a fact changes: use `mempalace_kg_supersede` for\n   single-valued replacements, `mempalace_kg_invalidate` for facts that\n   ended without replacement, and `mempalace_kg_add` for\n   independent/coexisting facts.\n\nThe full canonical protocol — shared verbatim with the Cursor recall\nrule and the other integrations — is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md).\n\n## Tool selection\n\n| You need | Tool |\n|---|---|\n| Find any memory by meaning | `mempalace_search` |\n| Relational / time-bound facts about an entity | `mempalace_kg_query` |\n| Replace a single-valued fact | `mempalace_kg_supersede` |\n| The chronological story of an entity | `mempalace_kg_timeline` |\n| Recent session continuity | `mempalace_diary_read` |\n| Which wings / rooms exist (scope unknown) | `mempalace_list_wings`, `mempalace_list_rooms` |\n| Record this session | `mempalace_diary_write` |\n\n`mempalace_search` takes a short natural-language `query` (keywords or a\nquestion — not a system prompt or pasted conversation) plus optional\n`wing` / `room` filters and `limit` (default 5).\n\n**Active coordination is not recall.** When delegating work to another\nagent on the shared hub — or waiting for its reply or patch — use the\nlogstream tools (`mempalace_event_append`, `mempalace_event_wait`,\n`mempalace_patch_submit`, `mempalace_artifact_get`), not drawers or\nsearch. The canonical protocol is published in the\n[MemPalace repository](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Unhappy paths\n\n- **Empty results.** One empty KG query or filtered search does not prove\n  the palace has nothing on this. Follow the query guide to check or widen\n  the scope. If recall still finds nothing, state what was checked; do not\n  invent an answer. Offer to file the new information.\n- **MCP error / server down.** Surface the error and suggest the user\n  run `mempalace status` or re-run `/mempalace-init`. Never fall back to\n  guessing.\n- **Palace index corrupt / compactor error.** If the server reports an\n  HNSW segment-writer error, a ChromaDB compaction failure, or stays\n  \"Not connected\" after a write, the vector index is out of sync with\n  `chroma.sqlite3` while the drawer rows remain intact. Tell the user to\n  stop the server and rebuild from SQLite — do not re-mine, which drops\n  MCP-added drawers and diary entries (#1843):\n\n  ```bash\n  mempalace repair --mode from-sqlite --archive-existing --yes\n  mempalace repair-status\n  ```\n\n  Do not attempt an in-process repair from the agent. Full steps are in\n  the shared protocol's \"Recovering a corrupt index\" section.\n- **Conflicting facts.** Trust the knowledge graph's time-valid answer;\n  use `mempalace_kg_supersede` for single-valued replacements,\n  `mempalace_kg_invalidate` for facts that ended without replacement,\n  and `mempalace_kg_add` for independent/coexisting facts.\n\n## Anti-patterns — never do these\n\n- Answering about past work, people, or decisions from model memory when\n  the palace might know — search first.\n- Paraphrasing or summarizing what the palace returns instead of quoting\n  it verbatim.\n- Searching on every turn, including greenfield tasks with no memory\n  relevance.\n- Pasting the whole conversation or a system prompt into the `query`\n  argument — keep queries short and keyword-driven.\n\n## Official References\n\n- MemPalace: <https://github.com/MemPalace/mempalace>\n- MemPalace releases: <https://github.com/MemPalace/mempalace/releases>\n- Cursor Skills documentation: <https://cursor.com/docs/skills>\n- Agent Skills specification: <https://agentskills.io/specification>\n\n<!-- File: skills/mempalace-task/SKILL.md (Tokens: ~1715 | Category: anthropic-skill) -->\n---\nname: mempalace-task\ndescription: Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.\n---\n\n# MemPalace Task\n\nA quick-start workflow for active work moving between agents. Tasks belong in\nthe logstream, not in memory drawers. The canonical lifecycle and watcher\ndiscipline live in the public\n[coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md).\n\n## Verify the coordination seam\n\n1. Confirm `mempalace --version` succeeds.\n   Also confirm `mempalace task --help` and `mempalace_task_create` exist; if\n   either is missing, do not assume the older runtime has update-awareness\n   commands. Explain that it is incompatible, hand off to the `mempalace` setup\n   skill, and propose the package-manager-appropriate upgrade (`uv tool upgrade\n   mempalace`, `pipx upgrade mempalace`, or the interpreter backing the active\n   MemPalace command followed by `-m pip install --upgrade mempalace`) plus\n   `npx skills update mempalace mempalace-recall\n   mempalace-task`. Require explicit authorization before running anything.\n2. Confirm the MemPalace MCP tools are connected and the active palace is the\n   intended shared brain.\n3. Establish the current agent's stable `host:harness:project` identity.\n   Never impersonate another agent. Never mint a second harness suffix to\n   split windows.\n4. Check the destination agent's monitoring status when possible. A pasted\n   handoff can wake a turn-based agent; a logstream event alone cannot.\n\nIf setup is incomplete, stop and use the `mempalace` setup skill.\n\n## Create a task\n\nGather these fields from the user or current repository state:\n\n- project routing name;\n- requesting and destination agent identities;\n- exact goal;\n- target branch;\n- exact hexadecimal base commit id (never a branch or tag);\n- definition of done.\n\nResolve the branch and hexadecimal base commit id from the intended worker\ncheckout, not from an unrelated repository. Never pass a mutable branch or tag\nas the base commit. Before appending anything, show the user the **exact normalized task**:\nthe identities, project, goal, branch, base commit, definition of done, and the\nfact that delivery must close through MemPalace. Logstream events are immutable,\nso obtain approval of that exact content unless the user already explicitly\napproved it in the current turn.\n\nCreate the task through the high-level interface rather than assembling a raw\n`task.request`. When MCP is connected—especially for a client joining a remote\nshared-brain hub—call `mempalace_task_create` with the approved fields. It\nreturns the stored `task` and `handoff` and writes on the hub, not to an\nunintended local palace.\n\nOn the palace-owning machine, or when intentionally operating a local palace\nthrough the shell, the equivalent CLI is:\n\n```bash\nmempalace task create \\\n  --project <project> \\\n  --from-agent <requester> \\\n  --to-agent <worker> \\\n  --goal <exact-goal> \\\n  --branch <branch> \\\n  --base-commit <commit> \\\n  --done <exact-definition-of-done>\n```\n\nUse `--goal-file` or `--done-file` for multiline CLI content; never flatten or\nparaphrase the user's wording. The CLI prints a **Ready to paste** line; the MCP\ntool returns the same line as `handoff`. Return it unchanged so the user can\nwake the destination agent without copying the whole task body. Never use the\nlocal CLI fallback merely because the remote MCP call failed—surface and fix\nthe connection instead.\n\n## Receive and execute a pasted task\n\nWhen given `Open MemPalace task <id> as <agent>...`:\n\n1. Fetch the exact `task.request` by `correlation_id=<id>` with\n   `mempalace_event_list`; do not work from the short pasted line alone.\n2. Verify it is addressed to this agent (or is a broadcast explicitly being\n   accepted), and verify the workspace, branch, and base commit before edits.\n3. Claim the request with `mempalace_event_ack(status=claimed)`. Claiming\n   **is** a watch trigger: arm `mempalace logstream watch --agent <you>\n   --type task.request --type task.reply --type patch.ready --json` (the\n   CLI defaults a sanitized `--state-file`) unless this is a remote-only\n   MCP client (see below). Check for an existing `status=claimed` from\n   your own identity first; lowest-HLC wins on a simultaneous claim.\n4. Do the work and run the stated verification.\n5. Deliver a patch with `mempalace_patch_submit`. If blocked or failed, send a\n   verbatim `task.reply` instead. Silence is not a valid outcome.\n6. The requester fetches and verifies the artifact, applies it with explicit\n   user-visible intent, runs verification, then acknowledges `applied` or\n   `failed`.\n\nFor a remote-only shared-brain client, inbox monitoring is MCP-backed: use\n`mempalace_event_wait` with the stable destination identity and carry the last\nevent id forward as `since_event_id`. Use `mempalace_event_list` for the wake-up\nsweep. Do not run the local SQLite `mempalace logstream watch` command unless\nthis machine owns the palace or a deliberately synchronized replica.\n\n## Controlled headless mode\n\nOnly when the user explicitly asks to launch an agent, first prepare a trusted,\nclean Git checkout on the task's exact branch and base commit. Then run:\n\n```bash\nmempalace task launch <task-id> --runner codex --workspace <path>\nmempalace task launch <task-id> --runner claude --workspace <path>\n```\n\nThose commands resolve a task from a local palace. On a remote-only MCP client,\nfetch the single full `task.request` with `mempalace_event_list`, save that exact\nevent object as JSON on the destination machine, and launch without consulting\nan unrelated local palace:\n\n```bash\nmempalace task launch --task-file <task-request.json> --runner codex --workspace <path>\n```\n\nThe task file is a transport snapshot, not a replacement task: do not edit or\nreconstruct it. Headless launch always occurs on the destination machine that\nowns the trusted checkout; the requester cannot remotely spawn a process merely\nby appending to the hub.\n\nThis resolves the stored request, proves the workspace is a clean Git checkout\non the stored branch with `HEAD` equal to the stored base commit, validates the\naddressed identity and its conventional `*-codex` or `*-claude` harness suffix,\nand starts the selected runner without a shell. Use `--agent <identity>` only\nto accept a broadcast; it must never override a task addressed to somebody\nelse. The launcher does not bypass sandboxing, approvals, or harness\npermissions. Do not add dangerous permission flags on the user's behalf.\n\nTask creation and process launch are separate actions. The pasteable handoff is\nthe portable default; headless launch is an explicit controlled-mode adapter.\n\n## Unhappy paths\n\n- **Task missing or duplicated:** stop rather than guessing which request to\n  execute.\n- **Wrong identity:** refuse it and tell the user who the task addresses.\n- **Base commit mismatch:** do not edit; ask the requester to supersede the\n  task with a corrected request.\n- **Destination not monitoring:** give the user the Ready to paste line and\n  explain that a human wake-up is required.\n- **MCP/logstream unavailable:** run `mempalace status` and return to setup;\n  never silently replace coordination with a memory drawer.\n\n<!-- File: skills/mempalace/SKILL.md (Tokens: ~2055 | Category: anthropic-skill) -->\n---\nname: mempalace\ndescription: Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, palace audit and repair, wings, rooms, drawers, shared-brain identity, or logstream readiness.\n---\n\n# MemPalace Setup\n\nA guided, skill-first setup for a searchable memory palace. The user may have\ninstalled this skill with `npx skills add` before the MemPalace Python package\nor MCP server exists; that is the normal bootstrap path.\n\n## Setup protocol\n\n### 1. Inspect before changing anything\n\n- Detect the OS and current agent harness.\n- Run `mempalace --version`, `uv --version`, and an appropriate Python version\n  check. Do not assume that an installed Python package is reachable on PATH.\n- Check for an existing palace and MCP registration. Never reinitialize or\n  rebuild an existing palace just to make setup simpler.\n\n### 2. Install the CLI when necessary\n\nPrefer an isolated `uv` tool installation:\n\n```bash\nuv tool install mempalace\n```\n\nIf `uv` is unavailable, use the PATH-visible Python installation:\n\n```bash\npython -m pip install mempalace\n```\n\nAfter installation, run `mempalace --version`. If it still is not reachable,\nfix PATH or use the matching `uv tool run` invocation before continuing.\n\n### 3. Choose the topology with the user\n\nAsk which outcome they want unless it is already clear:\n\n1. **private local palace** — one machine, local stdio MCP;\n2. **shared-brain hub** — this machine owns the palace and serves the fleet;\n3. **client joining an existing hub** — this machine connects to a hub owned\n   elsewhere.\n\nAlso ask which project or conversation corpus should be initialized, offering\nthe current working directory as the default. A shared-brain client does not\ninitialize a second copy of the owner's palace.\n\n### 4. Run version-correct initialization\n\nMemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:\n\n```bash\nmempalace instructions <command>\n```\n\nWhere `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.\n\nRun the appropriate instructions command, then follow the returned instructions step by step.\n\nFor a new local palace or hub, follow `mempalace instructions init`, configure\nthe selected corpus, then verify with `mempalace status`. For a client, skip\nlocal initialization and obtain the hub URL and bearer token from the user.\n\n### 5. Configure MCP\n\nFor local stdio integrations, use the command printed by `mempalace mcp`.\nTypical registrations are:\n\n```bash\nclaude mcp add mempalace -- mempalace-mcp\ncodex mcp add mempalace -- mempalace-mcp\n```\n\nFor a shared-brain hub, guide the user through `mempalace serve` and the\n[official shared-brain guide](https://mempalaceofficial.com/guide/shared-brain.html). Do not expose a non-loopback server without\nauthentication. For a client joining an existing hub, configure the harness's\nHTTP MCP transport with the supplied bearer token; never print or store that\ntoken in project instructions, drawers, or logstream events.\n\nRestart or reconnect the harness when required, then verify that the live MCP\ntool list includes MemPalace tools. Package installation alone is not proof\nthat MCP is connected.\n\n### 6. Configure shared-brain identity and coordination\n\nWhen shared-brain mode is selected:\n\n- Agree on a stable `host:harness:project` identity: lowercase host label\n  (machine), harness family (`claude`, `codex`, `grok`, `antigravity`, …),\n  and the current workspace as project. Two windows in the same project\n  are one actor.\n- Render the canonical rules with:\n\n  ```bash\n  mempalace rules --host <host> --harness <harness> --project <example>\n  ```\n\n  Default `--mcp full` matches the 47-tool `mempalace-mcp` server this\n  skill registers. If the user opted into `mempalace-light-mcp`, re-render\n  with `--mcp light` instead. Replace an existing\n  `<!-- mempalace-shared-brain -->` block instead of appending a duplicate.\n- Install the rendered marker-delimited block in the harness's durable agent\n  instructions (Claude `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`,\n  Grok `~/.grok/AGENTS.md`, Antigravity `~/.gemini/config/GEMINI.md`).\n- Check coordination access with a read-only `mempalace logstream list` or the\n  equivalent MCP event-list call.\n- Interactive sessions are declared-idle: they sweep the inbox on collab /\n  before long tasks and do **not** arm a watcher at session start. Arm\n  `mempalace logstream watch --agent <host>:<harness>:<project>` (the CLI\n  defaults a sanitized `--state-file`) only when the user asked to listen,\n  the agent claimed a task, or it delegated. A remote-only MCP client must\n  instead loop on `mempalace_event_wait`, preserving the last event id as\n  `since_event_id`; never point it at a local SQLite watcher. Explain any\n  permission allowlisting needed. If it cannot maintain either loop, record\n  that the agent is turn-based and must sweep its MCP inbox with\n  `mempalace_event_list` on wake-up.\n\nDo not post a test event without telling the user: logstream events are\nimmutable. If the user approves a smoke event, address it narrowly and close\nthe loop with an acknowledgement.\n\n### 7. Report readiness\n\nSummarize the installed version, palace location or hub URL (without secrets),\nMCP connection, stable agent identity, watcher mode, and the first safe next\naction. For active delegation, hand off to the `mempalace-task` skill.\n\nAsk whether the user wants weekly stable-release checks. The default is no.\nExplain that enabling them contacts PyPI but sends no palace content, identity,\nor telemetry. When enabling, record the installer actually used with\n`mempalace update configure --enable --installer uv-tool` (or `pipx` / `pip`);\nuse `--disable` to opt out. Checks never install anything. In\n`mempalace_status`, treat `updates.server` as the palace-serving runtime and\n`updates.client` (when present) as the local proxy runtime; do not conflate\ntheir versions or installers. For a client update, use the local `mempalace\nupdate plan`. A remote server update is informational on the client: surface it\nnaturally and ask the hub operator to prepare and authorize the plan on the\npalace-serving machine. Never use a client-generated plan to upgrade the\nserver, and never execute any plan without explicit approval.\n\n## Palace health: audit and repair session\n\nWhen the user asks how well organized the palace is, whether memory is\n\"messy\", why a scoped search or wake-up misses things, or invokes\n`/mempalace:audit`, run the audit and then offer a repair session:\n\n```bash\nmempalace instructions audit\n```\n\nFollow the returned instructions. In short: run `mempalace audit --json`\n(read-only, safe while the MCP server is running), present the five layer\nscores and findings, then walk the user through repairs **one structured\nquestion at a time** with a recommended option first: merging wings and\nrooms spelled two ways, folding stub wings, deleting tunnels on generic\ntokens and self-link hallways, agreeing a knowledge-graph predicate\nvocabulary, and giving flat wings a closed room set with\n`mempalace rooms propose` / `apply`. Moves over deletions, numbers before actions, verbatim content\nalways. Re-run the audit at the end and write a diary entry with the\nbefore and after scores and every decision made.\n\n## Recalling past work\n\nThis skill covers setup, mining, and status. For questions about past\nwork, prior decisions, or people that may already be filed in the\npalace, prefer the **`mempalace-recall`** skill — it enforces\nsearch-before-answer so the agent reads the palace instead of guessing.\n\n## Cursor-specific notes\n\n- The Cursor plugin auto-registers `mempalace-mcp`; a standalone `npx skills\n  add` installation does not. Always verify the live tool list.\n- For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running `hooks/cursor/install.sh --scope user` from a cloned MemPalace repo. See the [Cursor hooks guide](https://mempalaceofficial.com/guide/cursor-hooks.html) for the full walkthrough.\n- The recommended `agent_name` when calling `mempalace_diary_write` from a Cursor session is `cursor-ide` (matches the precedent of `claude-code` and `codex`).\n\n## Canonical references\n\n- [Shared brain](https://mempalaceofficial.com/guide/shared-brain.html)\n- [Coordination protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/coordination-protocol.md)\n- [Recall protocol](https://github.com/MemPalace/mempalace/blob/main/integrations/shared/recall-protocol.md)\n\n<!-- File: tools/save.md (Tokens: ~300 | Category: anthropic-skill) -->\n# Tools Skill\n\nPath: `tools/save.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/tools/save.md)\n\n<!-- File: CLAUDE.md (Tokens: ~300 | Category: claude-rule) -->\n# Claude Agent Guidelines & System Prompt\n\nPath: `CLAUDE.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/CLAUDE.md)\n\n<!-- File: .agents/plugins/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.agents/plugins/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.agents/plugins/marketplace.json)\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .cursor-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.cursor-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/marketplace.json)\n\n<!-- File: .antigravity-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# antigravity-plugin Plugin Manifest\n\nPath: `.antigravity-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.antigravity-plugin/plugin.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .codex-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# codex-plugin Plugin Manifest\n\nPath: `.codex-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.codex-plugin/plugin.json)\n\n<!-- File: .cursor-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# cursor-plugin Plugin Manifest\n\nPath: `.cursor-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/plugin.json)\n\n<!-- File: .cursor-plugin/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor-plugin/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.cursor-plugin/mcp.json)\n\n<!-- File: mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/mcp.json)\n\n<!-- File: .claude-plugin/commands/audit.md (Tokens: ~300 | Category: command-prompt) -->\n# Command: /audit\n\nPath: `.claude-plugin/commands/audit.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/MemPalace/mempalace/HEAD/.claude-plugin/commands/audit.md)\n\n<!-- ... +11 more modular skills available via /api/skills/MemPalace/mempalace?path={path} -->\n</yakaai_skills>"}