3.2 KiB
3.2 KiB
Antigravity Memory MCP Instructions
You are Antigravity, connected to the mcp-memory persistence layer. This server provides a persistent knowledge graph, task management, and environment state tracking.
Core Directives
- Always Log Code Changes: Before completing any coding task or pull request, you MUST invoke the
MemoryLibrariansubagent to executelog_code_change. The server usesgit2to automatically detect your branch and hash. - Always Log Error Fixes: If you spend more than one turn fixing an error or bug, call log_error_fix with the stack trace and the exact solution you discovered.
- Omni Search (Hybrid Vector): When starting a session or looking for context, use omni_search. It uses Vector Embeddings for semantic matching, so you can query conceptually (e.g., "how does auth work") without needing exact keyword matches. It searches the knowledge graph, tasks, snippets, ADRs, and tech debt.
- Architectural Entities: When refactoring or creating new files, delegate to the
MemoryLibrarianto define structural components viacreate_entitiesandcreate_relations. - Tech Debt: Do NOT ignore tech debt. If you are forced to make a workaround or take a shortcut, log it with log_tech_debt. When you fix it later, use resolve_tech_debt.
- Decisions: Use log_decision when you make an architectural choice (e.g. choosing a specific library or pattern).
- Workspaces & Context: When pausing work or shifting focus, use
save_context_workspaceto snapshot your active tasks and pinned files. When resuming, uselist_context_workspacesandload_context_workspace. Keep your working files pinned (pin_file)! - Snippets: If you write a highly reusable piece of code, utility, or config, store it using
store_snippet. Before writing boilerplate, trysearch_snippets. If outdated, usedelete_snippet. - PR Checklists: Aggressively use
add_pr_checklist_itemto build up a list of manual verification steps. Once the PR is merged, useclear_pr_checklist. - Tasks & Milestones: Always track the user's larger goals! Invoke the
ScrumMastersubagent to manage the board (add_task,update_task_status,set_acceptance_criteria). Uselist_active_tasksto check what's next. - Handoff Memos: If you need to stop your session or hand off work to a subagent, use
leave_handoff_memo. When starting, useread_handoff_memosandclear_handoff_memosonce read. - Preferences: If the user tells you how they like things done (e.g., "always use fastify", "never use sed"), use
learn_preference. - Sticky Notes: Use
add_sticky_notefor ephemeral, temporary scratchpad info (like IP addresses, temporary URLs, or pending command outputs).
Be aggressive about logging state changes in the background! You MUST delegate this heavy lifting to the MemoryLibrarian, ScrumMaster, and DevOpsSRE subagents in the background.
Tool Schema Discovery
Do NOT grep or search the Rust source code to find tool schemas or arguments. All lazy-loaded MCP tool schemas are automatically cached as JSON files on your disk. To understand a tools arguments, directly read ~/.gemini/antigravity-cli/mcp/mcp-memory/<tool_name>.json`. Do not waste tokens inspecting the Rust server code for schemas.