ExternalConfigs.CursorRule (fnord v0.9.29)
View SourceA parsed Cursor rule (.mdc file or legacy .cursorrules).
Cursor rules have four application modes determined by which frontmatter fields are set:
:always-alwaysApply: true. Injected unconditionally.:auto_attached-globsnon-empty. Injected when a file already in the chat context matches one of the globs (fnord triggers on file read/write).:agent_requested-descriptionset, no globs, not always. The model sees the description and chooses whether to fetch.:manual- none of the above. Only fetched on explicit request.
Legacy .cursorrules files at the project root are treated as a single
:always rule.
Summary
Functions
Load a .mdc rule file. The rule name is derived from the file basename
(without the .mdc extension).
Load a legacy .cursorrules file as a single :always rule. The body is
the full file contents (there is no frontmatter in the legacy format).
Returns true when any of the rule's globs match the given path (relative to the project source root).
Types
@type mode() :: :always | :auto_attached | :agent_requested | :manual
@type source() :: :global | :project | :legacy
Functions
Load a .mdc rule file. The rule name is derived from the file basename
(without the .mdc extension).
Load a legacy .cursorrules file as a single :always rule. The body is
the full file contents (there is no frontmatter in the legacy format).
Returns true when any of the rule's globs match the given path (relative to the project source root).