refactor: consolidate nvim crates, extract server library, and update workspace dependencies

This commit is contained in:
Riz Ashraf committed 2026-10-04 01:42:59 +01:00
1 parent a083719cf1
commit 533adfd41b
53 files changed
+5967 -1230

No files matched your search

+108 -48
View File
@@ -2,70 +2,130 @@
To get the most out of the Antigravity MCP Memory server and its advanced developer tools, use specific phrases that clearly state your intent. This guides the LLM to use the most efficient tools, reducing token consumption, speeding up time-to-resolve (T2R), and avoiding brute-force file reading.
---
## 1. Global Semantic Code Search & Navigation
Instead of having the LLM use brute-force text searches or `grep` to find abstract logic, instruct it to use the new local vector embeddings.
* **Don't say:** "Grep the codebase for database connection strings."
* **Do say:** "Perform a semantic code search for how database connections are established."
* **Tool Triggered:** `semantic_code_search`
Instead of having the LLM use brute-force text searches or `grep` to find abstract logic, instruct it to use local vector embeddings.
* **Don't say:** "Grep the codebase for database connection strings."
* **Do say:** "Perform a semantic code search for how database connections are established."
* **Tool Triggered:** `semantic_code_search`
## 2. Codebase Exploration & Token Efficiency
---
## 2. Subgraph Expansion & Neighborhood Exploration
When inspecting complex system interactions or module dependencies around a target component.
* **Don't say:** "Tell me everything connected to the DatabaseTable node."
* **Do say:** "Get the subgraph expansion around 'DatabaseTable' up to 2 hops."
* **Tool Triggered:** `get_subgraph`
---
## 3. Automated Error Fix Suggestions
When encountering build failures, runtime crashes, or stack traces.
* **Don't say:** "Here is a stack trace, let's debug from scratch: [paste stack trace]"
* **Do say:** "Suggest an error fix for this stack trace before we start debugging."
* **Tool Triggered:** `suggest_error_fix`
---
## 4. Memory State Checkpointing & Safety Rollbacks
Before initiating risky refactors or running experimental multi-step subagents.
* **Don't say:** "Hope this refactor doesn't mess up our task board or memory graph."
* **Do say:** "Checkpoint the memory state under 'pre-refactor' before we begin."
* **Tool Triggered:** `checkpoint_state` / `restore_state`
---
## 5. Codebase Exploration & Token Efficiency
When entering a new file, avoid having the LLM read the entire contents blindly.
* **Don't say:** "Read server.rs and tell me what it does." *(Consumes massive tokens)*
* **Do say:** "Extract the AST skeleton of server.rs to understand its structure first."
* **Tool Triggered:** `read_file_skeleton`
* **Don't say:** "Read server.rs and tell me what it does." *(Consumes massive tokens)*
* **Do say:** "Extract the AST skeleton of server.rs to understand its structure first."
* **Tool Triggered:** `read_file_skeleton`
## 3. Debugging & Log Parsing
---
## 6. Debugging & Log Parsing
Stop copy-pasting giant walls of logs into the chat interface.
* **Don't say:** "Here is the error: [paste 500 lines of logs]"
* **Do say:** "The daemon crashed. Fetch the recent logs from daemon.log." or "Watch the process logs for server.log."
* **Tool Triggered:** `get_recent_logs`, `watch_process_logs`
* **Don't say:** "Here is the error: [paste 500 lines of logs]"
* **Do say:** "The daemon crashed. Fetch the recent logs from daemon.log." or "Watch the process logs for server.log."
* **Tool Triggered:** `get_recent_logs`, `watch_process_logs`
## 4. Git & Context Handoff
---
## 7. Git & Context Handoff
When you've been working independently and need to loop the LLM back in on your current state.
* **Don't say:** "I changed some files, here are the diffs..."
* **Do say:** "Get the active git worktree context to review my uncommitted changes before we continue."
* **Tool Triggered:** `get_active_worktree_context`
* **Don't say:** "I changed some files, here are the diffs..."
* **Do say:** "Get the active git worktree context to review my uncommitted changes before we continue."
* **Tool Triggered:** `get_active_worktree_context`
## 5. Clipboard Watch Mode (Research & Triage)
---
## 8. Clipboard Watch Mode (Research & Triage)
When you are doing intense debugging across StackOverflow, logs, and docs, use the clipboard watcher to auto-ingest your breadcrumbs.
* **Action:** Ask the LLM to turn it on: "Enable clipboard watch mode."
* **Do say:** "I'm going to reproduce the bug and copy some stack traces and IDs. Give me a minute, then read my latest sticky notes to catch up."
* **Tool Triggered:** `toggle_clipboard_watch_mode`, followed by internal Sticky Note reads.
* **Action:** Ask the LLM to turn it on: "Enable clipboard watch mode."
* **Do say:** "I'm going to reproduce the bug and copy some stack traces and IDs. Give me a minute, then read my latest sticky notes to catch up."
* **Tool Triggered:** `toggle_clipboard_watch_mode`, followed by internal Sticky Note reads.
## 6. Proactive Background Hooks & Autonomous Review
The Memory Server actively watches your filesystem for changes in `.rs`, `.lua`, `.md`, and `.toml` files.
* **Don't say:** "Can you run a linter and review the file I just saved?"
* **Do say:** "I just saved `file.rs`, check the autonomous review results to see if the daemon found any issues." (The daemon hooks fire automatically on file save).
---
## 7. Neovim Ghost Text (Live Previews)
Keep your workflow entirely within your editor rather than copy-pasting code blocks from the chat.
* **Don't say:** "Write the updated function here so I can copy-paste it."
* **Do say:** "Push this refactor to my active Neovim buffer as ghost text so I can review it in-line."
* **Tool Triggered:** `nvim_set_preview` (via `win-nvim` or `linux-nvim`)
## 8. Structural AST Editing
## 9. Structural AST Editing
When asking the LLM to modify complex files, prevent indentation bugs and regex failures by guiding it to use tree-sitter.
* **Don't say:** "Search for `fn process()` and replace it with this string."
* **Do say:** "Use the AST node replacer to swap out the `process` function in `server.rs`."
* **Tool Triggered:** `replace_ast_node`
* **Don't say:** "Search for `fn process()` and replace it with this string."
* **Do say:** "Use the AST node replacer to swap out the `process` function in `server.rs`."
* **Tool Triggered:** `replace_ast_node`
## 9. Interactive Terminal Execution
When asking the LLM to run commands that have prompts, long output, or ANSI colors.
* **Don't say:** "Run `cargo run` and tell me what the output is." (Hides output, hangs on prompts).
* **Do say:** "Send the `cargo run` command to my Neovim terminal split so I can interact with it."
* **Tool Triggered:** `nvim_send_to_terminal`
---
## 10. Bird's-Eye Repository Exploration
When the LLM is first analyzing a repository, don't let it run `ls -R` and guess.
* **Don't say:** "List the files in the directory and guess where the database code is."
* **Do say:** "Read the directory architecture to get a summary of what each file is responsible for."
* **Tool Triggered:** `read_directory_architecture`
* **Don't say:** "List the files in the directory and guess where the database code is."
* **Do say:** "Read the directory architecture to get a summary of what each file is responsible for."
* **Tool Triggered:** `read_directory_architecture`
## 11. Graph, Memory & Decay Management
Actively instruct the LLM to maintain its own memory constraints and organize data. The daemon automatically consolidates old sticky notes and snippets to prevent unbounded context growth.
* **Do say:** "Log this architectural decision in the knowledge graph."
* **Do say:** "Add a sticky note with the test database credentials for this session."
* **Do say:** "Create a milestone for the 'Rich Clipboard' feature and break it down into active tasks."
* **Tools Triggered:** `create_entities`, `log_decision`, `add_sticky_note`, `add_milestone`, `add_task`
---
## 11. Graph, Memory & Casing Standards
Actively instruct the LLM to maintain its memory constraints and use canonical casing.
* **Do say:** "Log this architectural decision in the knowledge graph using PascalCase for entity types."
* **Do say:** "Add a sticky note with the test database credentials for this session with a 1-hour TTL."
* **Do say:** "Create a milestone for the 'Rich Clipboard' feature and break it down into active tasks."
* **Tools Triggered:** `create_entities`, `log_decision`, `add_sticky_note`, `add_milestone`, `add_task`
---
## 12. Self-Healing Graph Maintenance
* **Don't say:** "Search for duplicates and orphaned entities in the graph manually."
* **Do say:** "Sweep graph health to identify orphaned entities and duplicate candidates."
* **Tool Triggered:** `sweep_graph_health`
---
## 13. Causal Lineage & Provenance
* **Don't say:** "Search all tasks, ADRs, and commits to explain why this file was changed."
* **Do say:** "Query lineage for `server/src/state.rs` to construct a causal timeline."
* **Tool Triggered:** `query_lineage`
---
## 14. Actionable Task Resolution
* **Don't say:** "List all tasks and figure out which ones are blocked."
* **Do say:** "Get the next actionable tasks to find unblocked work ready for execution."
* **Tool Triggered:** `get_next_actionable_tasks`
---
## 15. Diagnostic Hypotheses & Reasoning Traces
* **Don't say:** "Let's test three guesses and remember what we tried in chat."
* **Do say:** "Log a hypothesis for this memory leak with tested evidence."
* **Tool Triggered:** `log_hypothesis` / `query_hypotheses`
---
## 16. Context Workspace Diffing
* **Don't say:** "What is the difference between my feature workspace and the main workspace?"
* **Do say:** "Diff context workspaces between 'feature-branch' and 'main'."
* **Tool Triggered:** `diff_context_workspaces`
---
By phrasing requests around *actions* rather than *information retrieval*, the LLM is primed to leverage the rich MCP toolset built into the Antigravity Memory Server.