<!-- BEGIN:agentmemory -->
# agentmemory Governance & Execution Policy
> **MANDATORY GOVERNANCE FOR ALL AI AGENTS & ASSISTANTS** (Antigravity 2.0, Antigravity IDE, Claude Code, Codex, OpenCode, Gemini CLI/agy, and subagents). Reconciles `mem_mso8332m` (MCP-First) + `mem_msnlgaig` (Project Exception).
## 1. Execution Protocol (MCP-First Policy across ALL Operations)
1. **PRIMARY Protocol**: Use MCP tools (`memory_save`, `memory_recall`, `memory_lesson_save`, `memory_export`, `memory_consolidate`, etc.) for ALL `agentmemory` interactions, usage, and operations.
2. **REST / HTTP API FALLBACK**: REST endpoints (e.g., `POST /agentmemory/remember`, `POST /agentmemory/recall`, `POST /agentmemory/export`, etc.) are FALLBACK ONLY if:
a. The MCP server fails, crashes, times out, or is unavailable, OR
b. Project field scoping is strictly required for a write (MCP `memory_save` silently drops the `project` parameter at runtime — verified live, `mem_mso88wlk`).
3. **No Raw REST Scripts as Default**: Never write raw `Invoke-RestMethod` / `curl` scripts as the default path for routine operations — it defeats the unified MCP architecture.
## 2. Post-Upgrade Maintenance & Re-verification (All Agents & Skills)
Whenever `@agentmemory/agentmemory` or host agent packages are updated (`npm update -g @agentmemory/agentmemory`, system updates, or skill updates):
1. **Re-Verify Absolute Hook & Config Paths**: Global package upgrades change NPM installation paths. Instantly re-verify absolute `.mjs` script paths across ALL agent configuration surfaces to prevent `ENOENT` crashes:
- **Antigravity 2.0 (Electron / Primary)**: `~/.gemini/antigravity/mcp_config.json`
- **Antigravity IDE (VS Code Fork)**: `AppData/Roaming/Antigravity/User/mcp.json`
- **Claude Code**: `~/.claude/settings.json` & `~/.claude.json`
- **Codex**: `~/.codex/hooks.json` & `~/.codex/config.toml`
- **OpenCode**: `~/.config/opencode/opencode.json` & `~/.config/opencode/plugins/agentmemory-capture.ts`
- **Gemini CLI / agy**: `~/.gemini/config/hooks.json` & `~/.gemini/config/mcp_config.json`
2. **Re-Verify Skills & Plugin Bundles**: Ensure official skill manifests and reference files in (e.g., `~/.gemini/config/skills/`, `~/.agents/skills/`, etc.) (`agentmemory-agents`, `agentmemory-architecture`, `agentmemory-config`, `agentmemory-hooks`, `agentmemory-mcp-tools`, `agentmemory-rest-api`, etc.) and `plugins/` remain intact and registered.
## 3. Surface & Verification Protocol (Official-Source Rule)
1. **Routine Operations**: Known routine ops (`memory_save`, `memory_recall`, `lesson_save`) -> execute via MCP tools directly. No pre-loading of skills required.
2. **Surface / Officialness Inquiries**: When asking if a feature, tool parameter, config variable, or endpoint is official -> load the RELEVANT official SKILL first (`agentmemory-agents`, `agentmemory-architecture`, `agentmemory-config`, `agentmemory-hooks`, `agentmemory-mcp-tools`, `agentmemory-rest-api` + their `REFERENCE.md`). Never reason about the surface from memory, guesswork, or raw MCP runtime output alone.
3. **Realtime Facts & Documentation**: Use `ctx7` ONLY (`npx ctx7@latest library <name>` then `docs <libraryId>`). NEVER raw-fetch GitHub files as the primary source of truth.
4. **MCP Failures / Missing Features**: If an endpoint or feature is missing from the MCP runtime surface -> STOP and load official skills + `ctx7` before proceeding.
5. **Zero Workarounds**: Only official or official+manual mechanisms are permitted. If unsure whether a mechanism is official, state "not verified" instead of inventing a workaround.
<!-- END:agentmemory -->
FEATURE CONCERNS MANDATORY
Finalize the support for
agentmemory connect <agent>onwindowsand provide adoctorcheck on it, since we windows users only manually setup the configuration for it, based onManual(Official)strictly NOT aworkaround.Add support on
Antigravityvariant such as(e.g., 2.0, IDE, AGY-CLI)i also did a manual step configuration on it and I notice it can only update these (e.g., memories, lessons), it can NOT update the(e.g., timeline, graphs, sessions, etc.). So my flow is, sinceOpenCodeis properly working on this it handle these w/out any issues.Add Support on
REST /lessons/delete. currently it was documented but not actually integrated to be used onagentmemory, to avoid anyworkaroundjust to delete a lesson is mandatory.Add
AGENTS.md, (any something similar to this)BLOCK foragentmemoryusage, becauseagentmemorystill get confused and hallucinate on how to use this properly, here i added a customize version on myself, you'll get my pointSKILLSforAI-*(assitants, agents)selection such as (e.g., Antigravity, Gemini, ClaudeCode, OpenCode, Codex, etc.) because skills installment path are unique to each others.