cursor

A rules integration for Lore, a system that stores decision context in git commits.

In plain words
What is it for?
Checking repository guidance before edits and adding structured context when committing changes.
Why use it?
It shows constraints, rejected approaches, and standing instructions before files are changed, reducing repeated mistakes.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/ian-stetsenko/lore-protocol/cursor
Clone the repo
git clone --depth 1 https://github.com/Ian-stetsenko/lore-protocol
Per session 720 This file is loaded in full into every session.
When invoked 720 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00720 $0.00720
Opus 5 $0.00360 $0.00360
Sonnet 5 $0.00144 $0.00144
Haiku 4.5 $0.00072 $0.00072

Measured 2d ago against content hash 64a4fb1b171a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/adapters/cursor.mdc · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lore Protocol

This project uses the Lore protocol (v1.0) to embed structured decision context into git commits. Constraints, rejected alternatives, and directives are stored as git trailers and queryable via the lore CLI.

Before Modifying Any File

Run these commands for every file or directory you are about to change:

lore constraints <path> --json
lore rejected <path> --json
lore directives <path> --json

Rules:

  • Constraint = hard requirement. Do not write code that violates it.
  • Rejected = approach already tried and abandoned (alternative | reason). Do not re-explore it.
  • Directive = standing instruction. Follow it.

When Committing

Stage changes with git add, then pipe JSON to lore commit:

echo '{
  "intent": "fix: handle null user in auth middleware",
  "body": "Previously threw 500 on null user. Now returns 401.",
  "trailers": {
    "Constraint": ["must not throw -- return 401 instead"],
    "Rejected": ["silent redirect to login | breaks API clients"],
    "Confidence": "high",
    "Scope-risk": "narrow",
    "Tested": ["null user returns 401", "valid user still works"],
    "Not-tested": ["concurrent request race condition"]
  }
}' | lore commit

JSON Schema

  • intent (string, REQUIRED): why the change was made, max 72 chars
  • body (string, optional): narrative context
  • trailers (object, optional):
    • Constraint: string array -- hard requirements
    • Rejected: string array -- format alternative | reason
    • Confidence: low | medium | high
    • Scope-risk: narrow | moderate | wide
    • Reversibility: clean | migration-needed | irreversible
    • Directive: string array -- future instructions
    • Tested: string array -- verified scenarios
    • Not-tested: string array -- known gaps
    • Supersedes: string array -- 8-char hex Lore-ids replaced
    • Depends-on: string array -- 8-char hex Lore-ids required
    • Related: string array -- 8-char hex Lore-ids for reference

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 79 lines · 720 tokens per session scan A 64a4fb1b171a

Subscribe to this mod's changes

cursor is a cursor rule published in the GitHub repository Ian-stetsenko/lore-protocol (28 stars, last pushed 3mo ago), licensed MIT. It adds 720 tokens to every session, about $0.0036 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.