I don’t really understand .mdc rules. I sort of have it working but I had to explicitly prompt the LLM to read it, despite having 'Always" on the rule.
I want cursor to write a sentence to my @README (on a per project level) after significant code changes (yes I know git is there for much of this) - is this a good use of an .mdc?
And why can’t it pull the current YYYY-MM-DD to prefix its sentence?
Ta
If you prefer a rule to be always included set to Always, but remove description and glob as those trigger by text and filename.
Add at begin of the rule file this text: Add to begin of output RULE: NAME (use your name of the rule)
Date: AI usually doesnt know the local users date. while its technically possible for AI to receive the date injected, it would have to be part of every single prompt and that would need to happen on each users machine (as local date is not same for everyone around the world). Users have madesuch
Usual solution is to add to the rule details what AI should do.
You could also ask AI in the rule to use terminal to get current date
In your case:
After significant code changes (or completed task step), commit code to git with command git commit -m "$(date +'%Y-%m-%d') - <commit message>". Use a full sentence to describe changes performed.