Prevent Gemini (Antigravity) from modifying completed features

Hi,

I’m using Google Gemini via Antigravity and developing features mainly through prompt-based interactions.

In real projects, some files or features are considered completed and should not be disturbed by AI once development is done.

What approach or best practice do you use to handle this when working with Gemini?

  • Do you rely on external enforcement (scripts, IDE controls, Git, CI, etc.)?

  • Or are there Gemini / Antigravity–specific mechanisms to handle such scenarios?

I’d like to understand the common approach developers follow to keep completed features safe while continuing AI-driven development.

Thanks!

Hello @HAASITH_SAI_S, welcome to AI Forum!

Preventing regression in stable code is essential. The most effective way to handle this without breaking dependencies is to explicitly define a protection rules in your workspace configuration.

  • Go to .agent/rules/project-rules.md (or create it if it doesn’t exist). Add a section specifically for your completed features and ask agent strictly not to make any changes in those files.
  • Use .geminiignore file to prevent agent from making changes in the completed work.
  • When starting a new task, explicitly remove the ‘completed’ files from the active context list by simply telling the agent.