Most probably you are missing the literals required at the beginning of rules file:
Copy your rules file outside the .agents folder and verify the raw text. There should be something like this at beginning (if it’s not, add it):
---
trigger: always_on
description: Custom Description Here
---
This is my custom rule