A novel recommendation to mitigate frustrating agent/assistant encounters

For a few of my apps, I noticed both the agent and assistant getting stuck in repetitive loops, making redundant suggestions or worse of all implementing harmful changes.

Investigating further and comparing these apps with others there was an interesting commonality - those experiencing bugs had several pages with 600+ lines of code. My hunch is that its related to their memory and context window.

To work around this, I added an instruction to my devguidelines.md file which explicitly tells the agent or assistant to prefer components as opposed to directly coding instances on page e.g data capture forms

If you are interested, here’s the instruction: wherever possible, create ui components and store them in client/src/components instead of embedding code directly on pages. keep components focused and single-responsibility

If you combine this with 1 change = 1 chat i.e open new chats for everything, you should experience a smoother working relationship and even sanity.

God speed and good luck in your endeavours.

10 Likes

Nice, good work! That will be all :slight_smile:

Brilliant, I’m bookmarking this

What fixed it for me too was adding to my prompt “please review all your prior attempts to fix this issue, evaluate the results and come up with a new solution” so it doesn’t send me in a loop

1 Like

@pr99az do you need to add these instructions to the devguidelines.md file for each individual project? I’ve been using Bolt.new, and they provide a system setting that allows users to create a “Global System Prompt” where you can input instructions like this to be applied to all projects (you can also create project-specific prompts as well). It’s been a game changer for me.

If I have to divide my projects into multiple parts in order not to overload the agent, how do I make sure agent can remember where we were once I start the new chart window?

Where is devguidelines.md?

its on a project basis currently unfortunately. the bolt solution seems nice and something replit should work on for feature parity.

you should have a file in your repo as per these forum posts:

add a rule instructing the agent to read your codebase first. you can also select files to help it understand which areas to consider as priority.