You can tell Cursor to update its .cursorrules for you

I wanna share some useful Cursor insights with you.

I was having error after error trying to create a new field under my users table (postgres). After 20 minutes and a half dozen failed attempts, I checked the docs Postgres | Documentation | Payload and one prompt later, it all worked. New field was added.

So I asked Cursor in the console:

so lets review the errors we encountered and the solution.

why were we having so many failed attempts?
what did you learn that you can share with me, so i can better prompt you in the future?

It then proceeded to breakdown our journey and the lessons learned.
So I linked it to .cursorrules and told it to modify it with what weā€™ve learned.

Never tried that before. Pretty freaking cool. Iā€™m loving Cursor more and more everyday!

4 Likes

cool man , i will try later ~

@jjaimealeman Hi Jaime, thanks for this. Would you be able to share you .cursorrules file? It is always nice to see how other people are doing things. If there is private info and you cannot share, I will also understand.

1 Like

giving it the good olā€™ ā€™ and what did we learn, is there anything you would like to add to our rules to do better next time ā€™ proved quite fruitful

1 Like

Sure thing amigo, all 220 lines here.

2 Likes

Thanks for sharing this. Are you using a tool or a certain approach to generate this JSON? My rules file is just MD and Iā€™m curious about the advantages of this structure.

This has become my new favorite prompt:

2 Likes

:rofl:

I guess you missed the whole point amigo.

I use Cursor itself to rewrite its .cursorrules file

s

Iā€™d be interested to see what other folksā€™ Agents spit out whe the following is asked:

Funnily enough, I had a ā€œchatā€ with Cursor about which format it preferred, and it said the .json, while well-structured, was not as easy to follow as the markdown file. It said the markdown, being in a natural language, was easier to read and comprehend.

I copied my markdown formatted cursorrules into ChatGPT and asked it to format as a json structured object. Then named them .cursorrules1 and .cursorrules2. One was markdown, and the other json. It still preferred the markdown.

So thatā€™s the one I kept and the format I continue to use.

Thereā€™s a thread on here about the format, and it seems many users use json. So I really donā€™t know?!

Can you try and do the same as I did? Make one in markdown, and the exact same rules as a json file, and ask Cursor which it prefers and why?

Iā€™d be interested to know what you and others find out.

lol i use ai so it reads all the files and generates the most accurate .cursorrules for the project

I had it tell me the same thingā€¦

However, I have been fiddling various .mf .rmd and json dialogues with all the GPTsā€¦

Here is my off_the_cuff subjective anecdoteā€¦

for data that is slurped into a project/workflow/context that is structured DATA - jsonā€¦ for declarative, narrative, @docs, architecture, schematic ā€¦ i,e, Knowledge Conveyance, Agentic Controls: .md (.rmd in my pref - as I like to tell it things like "include mermaids for all schema, logic, and convert to svg as well.

But like I showed, having it tell me stuff about the project that I can render to a synopsis HTML in Rstudio is a pretty dope workflow Ill be automating as a park of my workspace settings:

like I have it output SVGs of the Composer VSCDB tables/Schema and then convo_flowā€¦



There is a lot to learn once we get proper Agent_Wrangler_9000 shipped.