Project rules can not access mentioned files

In new project rules it is supposedly possible to include other files via mention.

This is my database.mdc:

---
description: Datenbankstruktur je nach Bereich
globs: *.cpp
---
Lagerverwaltung, Einkauf - [Datenbank-Lager-Einkauf.txt](mdc:.cursor/rules/Datenbank-Lager-Einkauf.txt)
Kundenverwaltung - [Datenbank-CRM.txt](mdc:.cursor/rules/Datenbank-CRM.txt)
Produktion, Produktionsplanung, Ressourcenplanung - [Datenbank-Produktion.txt](mdc:.cursor/rules/Datenbank-Produktion.txt)
Projektverwaltung, Projektmanagement - [Datenbank-Projekt.txt](mdc:.cursor/rules/Datenbank-Projekt.txt)
FIBU, Buchhaltung - [Datenbank-FIBU.txt](mdc:.cursor/rules/Datenbank-FIBU.txt)
POS, Kasse - [Datenbank-POS-Kasse.txt](mdc:.cursor/rules/Datenbank-POS-Kasse.txt)
Verkauf, Angebot, Auftrag, Lieferschein, Rechnung - [Datenbank-Verkauf.txt](mdc:.cursor/rules/Datenbank-Verkauf.txt)
Lagerverwaltung mit Chargen und Seriennummern - [Datenbank-Chargen-Seriennummer.txt](mdc:.cursor/rules/Datenbank-Chargen-Seriennummer.txt)
Vermietung - [Datenbank-Mietvertrag.txt](mdc:.cursor/rules/Datenbank-Mietvertrag.txt)
Qualitätskontrolle mit Proben - [Datenbank-Proben.txt](mdc:.cursor/rules/Datenbank-Proben.txt)
Wartung - [Datenbank-Wartung.txt](mdc:.cursor/rules/Datenbank-Wartung.txt)
Zeiterfassung - [Datenbank-Zeiterfassung.txt](mdc:.cursor/rules/Datenbank-Zeiterfassung.txt)

When I use it in the prompt (@database.mdc)

The Composer answers like this:

I see that the database rules are mentioned in database.mdc, but the actual content of the referenced files (like Datenbank-Verkauf.txt) is not available.

I can mention the txt file directly, and then the Composer can access it.

Here is the request-id: 98be8781-7d71-4e48-aefd-6648bf6265d3

I just found the answer - the other files must also be mdc. I hope this helps someone.

2 Likes

Ok, now I have added all my documentation files in form of mdc, the Composer refuses to find them.

They are parked under .cursor/rules

Here is the request id: 20980792-4b05-4e7e-886f-c4967245ab90

Can you see them in your Project Rules section in your Cursor settings?

Yes, they were visible there.
I believe I have found the cause. All the files together are very large. It seems they are not indexed, like the codebase, but taken in their entirety as the context.

The effect was, that the genai got extremely stupid, and could not answer even the most simple questions.

My solution is to put those files on the internet, and add them to the project as @docs. I have not done that yet, but am expecting this to be the right solution.

I believe hyphens were not correctly supported in this case, but we have added some UI in v0.46 (rolling out today or tomorrow to all users), which shows what rules are available and in use for each prompt.

1 Like