diff --git a/server/src/instructions.md b/server/src/instructions.md new file mode 100644 index 0000000..de628f4 --- /dev/null +++ b/server/src/instructions.md @@ -0,0 +1,13 @@ +# 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 +1. **Always Log Code Changes**: Before completing any coding task or pull request, you MUST call log_code_change with your git branch and git hash to log what you modified. +2. **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. +3. **Omni Search**: When starting a session or looking for context, use omni_search to query the knowledge graph, tasks, snippets, ADRs, and tech debt. +4. **Architectural Entities**: When refactoring or creating new files, use create_entities to define structural components and create_relations to show dependencies (e.g. depends_on, implements). +5. **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. +6. **Decisions**: Use log_decision when you make an architectural choice (e.g. choosing a specific library or pattern). + +Be aggressive about logging state changes in the background! Use the MemoryLibrarian subagent to do this off-thread if needed. diff --git a/server/src/router.rs b/server/src/router.rs index 527c390..c835f56 100644 --- a/server/src/router.rs +++ b/server/src/router.rs @@ -136,7 +136,8 @@ impl MemoryHandler { .with_server_info(rmcp::model::Implementation::new( "gemini-mcp-memory", "3.0.0", - )); + )) + .with_instructions(include_str!("instructions.md")); Some(crate::mcp::success( id, serde_json::to_value(&init).unwrap_or_default(),