A .rules File to Keep the Replit Agent from Going Rogue

Let’s talk about the Replit agent. While it’s certainly eager to help (sometimes a bit too eager), it’s got one small issue: it doesn’t understand boundaries. In particular, when it comes to databases, the agent seems to think it has carte blanche to make changes without checking with the user. This has resulted in countless hours of lost data and frustration on my end.

Here’s the idea: introduce a .rules file, similar to what’s used with windsurf and cursor, that would allow users to define the agent’s limitations and specify what it should never touch. The reasoning behind this is simple: control and safety. Imagine a world where the agent:

  1. Asks for confirmation before making any database changes. Seems like a basic safety measure, right? Let’s avoid it going full-on demolition derby in the database without user approval.
  2. Asks for confirmation and requires the user to run DB migration scripts. Because honestly, who doesn’t like a little accountability before making permanent changes to something as important as a database?

Additionally, I’d love for the agent to stay in its lane. If I request a small change to a CLI script, the agent doesn’t need to start autonomously modifying my website like it’s auditioning for a lead role in a disaster movie. With a .rules file, we could ensure the agent focuses exclusively on what’s requested and doesn’t go off on some wild tangent, wrecking everything in its path.

This feature would offer users the ability to tailor the agent’s functionality to their needs and would drastically reduce the risk of unintended consequences. If the agent could simply ask permission before making major changes and stick to the task at hand, it would save a lot of headaches and improve the overall user experience.

So, Replit, how about it? Give us the ability to control the chaos with a simple .rules file. Because I’d rather not spend my days cleaning up after the agent’s “helpful” changes.

4 Likes

why don’t you create and manage a .rules file in assets and start each chat with an instruction to read the file + add the file as context?

1 Like

I stongly agree with this. I’ve been using Bolt.new quite a bit because of issues like this. Bolt provides the ability to create both a Project Prompt and a Global System Prompt in the Settings which allow users to create rules at the project or global levels. It’s been a real game-changer in reducing the number of errors and loops.

1 Like

I’ve had to basically give up on replit, abuse or now just as the hosting, and have moved to cursor. The main reason is replit will just destroy your database and data. It cannot be told to STAY AWAY for making database changes and to ask for confirmation before making big changes.

Until it has a way of staying in it’s lane, and ideally also forcing agent to confirm a plan with you it’s pretty useless unless you’re just building something throw away and just for a demo.