Skip to main content

Adopting Lore (non-normative)

First rules. Add a Lore folder with a first .lore file, at the repository root for rules that apply everywhere, or beside the code a set of rules governs (see Files and folders). A rule with no category is still eligible, with a warning, so existing rules can be wrapped and scoped first and classified later.

Highlighting. Until editors support Lore, this line in .gitattributes makes code hosts that read these attributes highlight .lore files as Markdown:

*.lore linguist-language=Markdown gitlab-language=markdown

Agents. Paste AGENT.md, heading included, into the instruction file your agents read: AGENTS.md at the repository root, or the file a particular agent reads instead.

Sources. Cite the document a rule was written from in its <source>, and run lore audit in CI. It reports a source that no longer resolves, and one whose text changed since the rule was last reviewed (see Sources and Auditing sources).