Lore

Disclosure and glossary

Tell Lore when a memory should surface, and which words should find it.

Disclosure decides when a memory surfaces, and the glossary decides which words find it. Write the disclosure as a situation and the glossary as the words people type, and recall can match the memory through both routes.

Disclosure

A disclosure describes the situation that should bring the memory up. Write it as a future situation, not as a summary of the content. The agent reads the disclosure to decide whether the memory matters for the task in front of it, so name the task, the area, or the symptom.

Use this pattern:

When [doing a task], [touching an area], or [seeing a symptom] in [project or product].
DisclosureVerdictWhy
When changing refund or payment webhooks in checkout-apiGoodOne situation, with the area named
When a refund webhook fails on retry in checkout-apiGoodNames a symptom the agent will see, and still one situation
Important webhook infoWeakSays nothing about when the memory applies
Summary: webhooks are idempotent by event.idWeakDescribes the content, not the situation
When changing webhooks, refund emails, or invoicesWeakThree situations joined by OR. Split it into three memories.

Follow three rules:

  1. One situation per memory. If you need "or" to describe the trigger, split the memory into one node per situation.
  2. Describe the future, not the content. Ask when someone will need this memory.
  3. Use the words of the work. Name the task, the area, or the symptom the way your team names it.

Warning

The disclosure check warns when a new memory has no disclosure. It also warns when a disclosure uses OR wording, both on create and when you change a disclosure. Warnings do not block the save. The check recognizes Chinese OR markers (或, 或者, 以及) but not the English word "or", so review your own disclosures for it.

Lore also builds the memory's views from its disclosure. A clear situation therefore helps semantic recall as well as the disclosure check.

Glossary

The glossary holds the words people actually type when they mean this memory. Keep it to terms that someone would use to find the memory: names, aliases, abbreviations, Chinese and English variants of the same term, and error names.

AddExamples
Product and project names, including punctuated formscheckout api, checkout-api
AbbreviationsRLS (row-level security)
Chinese and English variants退款回调, refund webhook
Error names and symptoms people pasteduplicate key, idempotency conflict
Tool and file names that appear in promptsstripe, CLAUDE.md

Leave these out:

  • Generic words such as code, test, or fix. They match too many memories.
  • Whole sentences or pasted logs. A glossary term is a short phrase.
  • Words nobody would type. A term that appears only in the content does not help recall.
  • Duplicates in different forms. Lore removes only exact duplicates, so Stripe and stripe can end up as two terms. Pick one form.

How the glossary feeds matching

The glossary takes part in three kinds of matching:

MatchingWhat happensDefault weight
ExactA glossary term that appears in the prompt is an exact match.0.30 (recall.weights.w_exact)
Glossary semanticGlossary terms are embedded, so a prompt with a close meaning can match.0.25 (recall.weights.w_glossary_semantic)
Full-text (lexical)Glossary text is searched as words, along with other text.0.03 (recall.weights.w_lexical)

How recall works explains how these signals combine.

For example, take this prompt:

Why does the stripe refund webhook insert two rows?

stripe and refund webhook are exact glossary matches. The question also sits close to the memory's disclosure. In this case the memory can match through both its glossary and its views. Two independent routes make the memory easier to find.

Disclosure, glossary, and content compared

DisclosureGlossaryContent
Answers the questionWhen should this memory surface?Which words should find it?What is true, and what should the agent do?
Written asOne future situationShort terms and aliasesFacts, rules, decisions, or workflows
ExampleWhen changing refund or payment webhooks in checkout-apirefund webhook, stripeRefund webhooks are idempotent by event.id.
Used by recall throughViews and keyword searchExact, glossary semantic, and full-text matchingViews and keyword search
Common mistakeSummarizing the contentAdding generic wordsPutting the trigger into the content