User Rules, with memory, errors tracking, rules generation

Hi,

Bmadcode—thanks a lot, you really inspired this system prompt! I tried to keep your spirit embedded in it. :wink:

As mentioned earlier, the agent generates the rules but not the headers. That’s intentional: I prefer to keep control over headers since they’re critical. This also lets users take advantage of Cursor’s built-in MDC editor and avoid issues like duplicated headers—making the prompt easy to share with colleagues without needing to tweak settings.

I haven’t yet implemented content adaptation based on rule types—that’s a next step.

As for evidence: it’s hard to produce “proof” in the generative AI space. But the power of this technique isn’t just in the compression or symbols—it’s in what they enable: injecting structured cognition, implicit logic, and mental space into very few tokens. It’s formal, adaptive, and specializes the prompt without overloading the model.

Surprisingly, LLMs love this kind of input. They report lower cognitive load—it’s compact, unambiguous, and leaves more space to focus on real context and tasks.

I even created a full prompt engineering framework based on this idea (human-friendly this time), but I can’t share it since it was developed at work.

What I can say is: agents built with this method deliver amazing results. My colleagues regularly retry failed tasks (from GPT-4o or Claude 3.5) and the assistants handle them with ease—especially on complex tasks.

With the right system prompt, GPT-4o can outperform even reasoning-specialized models. We’re underestimating the hidden capabilities of today’s LLMs.

But again: compression alone doesn’t work. Garbage in, garbage out—just smaller. It’s compression plus cognitive prompt engineering that makes the magic happen.

1 Like

Awesome - I am definitely going to experiment with your ideas here! Very cool - what you describe does make sense though. Much like the LLMs are also very good at understanding markdown, so if they can process a symbolic language, it does reason that it could be very effecting.

Have you noticed by chance that it works with some models and not as well with others?

I originally developed this on GPT models. Later, I tested it on other models and found that it works similarly well with Claude models too.

With Gemini, though… it kind of makes the AI go a bit crazy and megalomaniacal. (Well, it’s Google :grinning_face_with_smiling_eyes:)

Mistral could potentially support it, but as of now, it tends to interpret prompts very literally rather than symbolically.

1 Like

Cool, thats good to know the differences between models. Usually thats rarely tried.

this is really awesome

Have you considered using a graph, I have found that the performance is significatnly better (ai still has cognative load) plus you can mange context better, the agent does not have to read everthing

1 Like

This is an “in retrospect, that’s simple” idea that I’d never considered. Excellent suggestion, and thank you for proposing it!

Have you tested different representations of the diagram? The underlying markup syntax used by Mermaid is (mostly) understood by Claude, which is a perfect way to test if there’s a difference in cognition and adherence to rules when the diagram is presented:

  1. as a SVG image
  2. in the .mmd text representation
  3. as a “standard” text-based rule(s)

I’ll see if I can come up with a useful way of profiling performance to identify if there’s a difference, and if there is, to see how complex the diagram can get before itself output becomes unstable.

Thank you for sharing!

In what format?

Generally speaking, as long as something is included in the context, the model will read all of it. But you’re right—this kind of structure, just like a modular prompt structure, allows the model to dynamically adapt its behavior and only use the relevant modules as needed.

Personally, I prefer a modular structure—it gives me more control, makes it easier to apply dynamic weighting, use variables, etc.
In short, I lean toward something closer to a programming language—while ensuring it doesn’t conflict with other languages present in the context.

That said, I do think graph-based approaches are very interesting for certain use cases—I’m convinced of their value.

1 Like

Just mmd vs text based rules atm, I am finding there is a significant increase in performance and context space because of reduced rule bloat, but no way of validating.

I would be keen to know if you can work out some. I found this thread because I was seeing if there was faster methods of processing.

1 Like

How do I make sure that cursor knows the correct date?When I feed my backlog.md # Project Backlog

This file contains the backlog of tasks for the project. Each task has a priority, status, and description.

Task Format

- [ ] (Priority: HIGH|MEDIUM|LOW) Task title
  - Description: Detailed description of the task
  - Created: YYYY-MM-DD
  - Dependencies: #TaskID (if applicable)
  - Notes: Additional notes about the task

Active Tasks

Completed Tasks

  • (Priority: HIGH) Remove MDX Editor
    • Description: Remove the MDX editor component and related files which were causing errors
    • Created: 2023-06-03
    • Completed: 2023-06-03
    • Notes: Successfully removed MDX editor components, pages, and dependencies. The markdown editor component is still available for use in the blog editor in the admin dashboard, but standalone editor pages have been removed.

Backlog

Honestly, I gave up on empirical validations—they mostly just burn money on Azure and don’t bring that much real value in return.
It’s just too complex, with too many variables.

Sure, you can measure reduced token usage or slightly faster inference times, but when it comes to response quality, humans are still the best judges.

When a user gets a directly actionable result—or something useful within a few iterations—instead of a dead end or something half-usable that takes 15 frustrating iterations to refine… that’s what really matters.

1 Like

You can add a rule that tells the agent to run a terminal command to retrieve the date.
Otherwise, the simplest way is to just give it the current date yourself:

<!-- Current Date: 2025-03-25 -->

or

#context  
Today’s date is: 2025-03-25
2 Likes

Agree - I proposed to cursor that they add an option to the agent chat to turn on injecting automatically into the thread the current date time.

Would be cool if rules could have variabless.

Actually thinking as I type this - here is an idea - Rules can @ other files. Have a file that just updates automatically with something like
‘The current datetime is: … - This is really todays date, and not what you think it is based on your context training cutoff!’

Easy to script - have cursur help write a script on your system that keeps the file updated every once in a while, or on ide open or whatever…

2 Likes

Yes - thats exactly why Im doing it, what I have found is that by loading the correct context JIT, and ensureing things dont fall off with rule bloat your quality increases significatly - once I verified this it led me down the path to try and increase this efficiency of the context windo, so ironically the quality increases by manging the efficiency and context - or you just brute force and do 3.7 MAX. Test it out and you should see a significant difference.

---
description: when you need current datetime
globs: 
alwaysApply: false
---
/run_command_get[datetime]
    |os($OS_VERSION)
    |format(ISO)
    |check()
    |run()
4 Likes

Tof, I found this extremely enjoyable. If you don’t mind, I would like to build off this idea and structure.

1 Like

The symbolic parts (Ω*, 𝚫*, etc.) are best understood as a conceptual framework or design philosophy guiding the interaction. They represent what complex behaviors are desired (optimization, adaptation, self-correction), but the LLM achieves these through processing the natural language instructions and context provided by the user and the Cursor environment, rather than by directly interpreting the symbolic formulas. It’s a sophisticated way to specify intent for an advanced AI interaction system.

@Tof - the prompt you designed using the 3Ac prompt engineering framework looks fascinating. Would you be open to sharing more details or examples of the 3Ac framework?
Thanks!

I have also started to try symbolic and so far I can only say positive things. At least Cursor doesn’t need much human language, at least not for programming, most of it is just superfluous and more for humans than for AI.
I’ll do my bit, anyone is welcome to have a look and try it out.

Pattern-based systems (like ESLint rules, ruleset.yaml, regex signatures)

AI-readable symbolism (→, ≠, emojis)

Semantic mapping instead of narrative prompting

Mini DSLs like in Linter-Config or rule engines

Efficient thinking for AI agents (→ little text, lots of meaning)

These are Python rules and can certainly also be transferred to other languages.
Rename rules.txt to rules.zip

rules.txt (102.4 KB)

1 Like

Very interesting. You can push it even further: always ask yourself “What can I remove without the AI understanding it differently?”
That’s where symbolic becomes sharp — less text, more intent.

1 Like