Your coding rules, remembered
Lore keeps a small set of rules for each project and hands your AI agent only the ones it needs, right before it edits. Local, dependency-free, and mostly hands-off.
git clone https://github.com/viktorg1/lore ~/projects/lore
python3 ~/projects/lore/install.py
Why Lore
Agents forget your standards and repeat the mistakes you already corrected. Long instruction files fix that badly: they are noisy, they go stale, and the model skims them. Lore keeps rules as small, scoped, individually managed items, and serves each edit only what it needs.
Hands-offIt learns by itselfThe agent saves a rule when you correct it, reads the code of a new project, and reads your pull-request review comments. You are only involved when something is flagged.Read about automatic mode →
CheapOnly what the work needsThe agent says what it is changing and gets the matching rules, never the same rule twice in a session, plus a one-line title for each rule it did not get.See how rules are chosen →
CarefulSafe by defaultHidden text is refused, risky wording is held for you, review comments from outsiders are ignored, and only your own repositories can activate rules by themselves.Read the security model →
SimpleLocal and dependency-freePython 3.10+ and the standard library. Rules are plain JSON in
~/.lore. No server, no account, no background model calls.Look at the architecture →How it works
Three sourcesyour corrections
your code
PR review comments
your code
PR review comments
→
The agent proposesone clear sentence, a scope, a title and trigger words
→
Lore screenshidden text, risky wording, contradictions, trust, limits
→
Activeserved by
get_rules before each editAnything that fails the screening stays pending until you approve it, in the terminal or the web UI. Everything Lore activates by itself is marked, listed and one command away from being undone.
What Lore is not
Lore does not train a model. It is retrieval memory: rules are text you can read, edit and delete, and they take effect the moment they are saved. The agent calls Lore because its instructions say to; that is a request, not enforcement.
Where to go next
Getting startedInstall, connect, and see it work in a few minutes.Read more →
Connect your agentClaude Code, Copilot CLI, VS Code, or no MCP at all.Read more →
Core conceptsProjects, rules, scopes, statuses, tags and where data lives.Read more →
MCP toolsThe eight tools your agent uses, with parameters and replies.Read more →
CommandsEvery script:
install, memorize, train, discover, learn, review, serve.Read more →
Extending LoreTeach discovery a new language, framework or convention.Read more →
ArchitectureEvery package and file, and how a request flows through them.Read more →
TroubleshootingSymptoms, causes and fixes.Read more →
Honest limits
- Selection is keyword-based. Lore ranks rules with plain keyword matching and a small topic vocabulary, plus the agent's own tags. A rule worded very differently from the task can be held back; the title list and
includeare the safety net. - Screening is pattern matching. A carefully worded malicious rule can pass it. Manual mode makes every proposed rule wait for you.
- Discovery reports what code does, not what is right. Treat every proposed rule as a draft with evidence.
- Evidence for instruction files is mixed. Rules can help, but more rules cost more tokens. Keep the approved set small and specific.