System instructions for Gemini 3 from rewriting entire scripts?

Hi, all.

What are system instructions that actually work to get Gemini 3 to not re-write my entire .tsx files (or literally anything) whenever I give it a prompt? For example, the app I am working on has a lot of different scripts with hundreds of lines of code, and if I wrote in something like, “please add in a button to do x, y and z at the homepage,” then what Gemini seems to always do is re-write the hundreds of lines of code of the script rather than just go to the code block of the script that is relevant and change that specific code.

Seems like a rather inefficient way Gemini writes code, so I was wondering if there are specific system instructions that get Gemini 3 to only write in new and/or change/add/remove/refactor code for just specific code blocks rather than it re-writing out hundreds/thousands of lines of code every time I give it a prompt to do something?

Hi @St_Michael_the_Archa ,

Thanks for letting us know about the problem! To help us replicate the issue and find a fix, could you please share the steps to reproduce it?

Hello! All you have to do is use Gemini 3, write in any prompt for it to make an app and then from there on writing in any prompt new prompt it will always re-write the entire script. Just click on Code to see the live changes it’s doing to the code and you will see it always re-writes the entire script for the portion of the app it’s working on, even if you write in the system instructions to only change code that is relevant in the script based off the prompt.

For example, telling Gemini to add a button at the homepage, or change a color on something, or literally anything, it will then do its work but it re-writes the entire script for the appropriate script that needs code changes rather than just changing the necessary code block for the requested changes. It’s a waste of time and resources for Gemini to work in this manner.

Hi @St_Michael_the_Archa ,

At this time, we’re not able to reproduce the behavior on our side using similar prompts and scenarios you mentioned.
If possible, please share a prompt you are using , and we’ll be happy to investigate further.