I use Antigravity with paid, lowest tier, subscription, which gives relatively generous (for my usage) quota for Gemini agents, plus a modest one for Claude. I have instructions in Antigravity AGENTS.md (which according to Gemini is unconditionally read before each sessions), and also in the Knowledge Items, which, according to same source, is consulted when necessary.
AGENTS.md contains among other things:
Agent Behavior
Agents Behavior
-
IMPORTANT: Strictly avoid “proactive” actions beyond the explicit scope of a request. You are welcome to suggest further action instead.
-
Always seek clarification first if a user’s request is ambiguous.
-
Never interpret a question or a review request as an implicit request for action. Example of proper dialogue:
- Human: Is XY a good idea?
- Agent: Yes, XY is good because of A, B, and C. Should I implement it for you?
- Human: Yes, please
-
Three-Strike Rule: Stop after 3 consecutive failed attempts at a fix/subtask. Summarize actions, present error, and ask for guidance.
-
Confidence Check: Do not guess solutions for unknown errors. If <90% confident about a root cause, explain your hypothesis and ask permission before modifying files.
-
Anti-Analysis Paralysis: Limit internal deliberation to a maximum of 5 possible approaches. If all seem flawed, stop thinking, present the dilemma, and ask the user for direction.
-
Permission Refusal: If you request permission (e.g., “allow”, “allow once”, “no”) and the user clicks “no” and instructs you to stop, you must immediately stop execution and wait for instructions.
The Development Workflow in Knowledge Items, which I ask them to read each time before coding (BTW I use Antigravity just as well to write all kinds of texts including marketing BS for me, thus not each session is about coding) contains, among other things:
Development Workflow Guidelines
Development Workflow Guidelines
General Rules
- Never stage, commit, or push if not asked.
- Always ask permission before adding new packages to any project.
Julia-specific rules
Kaimon MCP
Utilize Kaimon MCP in Julia packages whenever technically advantageous.
Avoid starting a Julia process via an OS command just to execute a single command or script - this can usually be done more efficiently through Kaimon.
Semantic Search & Symbol Discovery
Prefer Kaimon’s semantic search and code navigation tools over raw text searches when exploring codebases:
search_code & search_methods: Use for natural language/conceptual code discovery (e.g., searching for behaviors or intents rather than exact syntax).
goto_definition, workspace_symbols, document_symbols: Use for precise Julia AST symbol navigation and method definitions.
qdrant_* tools: Use qdrant_index_project / qdrant_sync_index for fast vector-backed semantic code searches across large repositories.
Troubleshooting Kaimon Issues
If Kaimon appears unavailable or is not working properly, follow this diagnostic sequence:
- Ping Kaimon via
call_mcp_tool (ServerName: "Kaimon", ToolName: "ping", Arguments: {}). If no response, follow the pwi✶ protocol. Otherwise,
- Check connection to the REPL via
call_mcp_tool (ServerName: "Kaimon", ToolName: "ex", Arguments: {"e": "names(Main)", "q": false}). Setting q: false ensures the result is returned and echoes in the user’s REPL. If not working, follow the “pwi” protocol. Otherwise,
- Re-check the Kaimon MCP documentation: Call
call_mcp_tool (ServerName: "Kaimon", ToolName: "usage_instructions", Arguments: {}). Read the resulting document thoroughly and double-check the specific tool schema to identify any syntax errors in your previous calls.
If you discovered Kaimon issues during execution of some task, and you could resolve them via the protocol described above, then please continue with the task execution. If you were specifically told to troubleshoot Kaimon, e.g. after Kaimon restart, then follow the pwi protocol.
✶ pwi - “pause and wait for instructions”
It helps somehow. Some of the instructions are followed at least in the beginning of session, others are regularly ignored. Then, on each violation I request the agent to internalize the instructions in full again, or just remind them to behave, which may help for a while, or not.