RAC — lint and diff product requirements written in Markdown.
Project description
Lore
Quickstart · How it compares · How it works · Docs · CLI · Changelog
Give your coding agent the decisions your team already made — so it stops re-doing things you ruled out.
Lore keeps your team's recorded knowledge — requirements, decisions, designs, roadmaps, and prompts — as typed Markdown in your repo and serves it read-only to Claude Code, Cursor, and Claude Desktop over MCP, so the agent cites your decisions instead of violating them. No RAG, no embeddings, no model call to decide what's relevant — retrieval is deterministic and reproducible. It is built on RAC — Requirements as Code, the open-source engine underneath; the package, CLI, and MCP server ship under the rac name.
How it compares
Lore isn't a search index or a memory tool — it's the deterministic system of record an agent grounds against. Fuzzy retrieval (RAG, agent memory) is good at finding what's near a loose question; Lore is good at returning the exact, current decision and declining the ones you've superseded. They compose well — recall fuzzily, then verify in Lore.
| Lore | Fuzzy retrieval (RAG / agent memory) | |
|---|---|---|
| Good at | the exact, current decision | finding what's near a question |
| Retrieval | deterministic, reproducible | similarity-ranked, varies by run |
| Role | source of truth, read-only | a fast index or working copy |
| In CI | enforced (rac validate / rac gate) |
not its job |
Quickstart
-
Install the engine:
pip install rac-core
-
Scaffold identity and your first artifact:
rac quickstart -
Connect your agent (Claude Code, from your repo root):
claude mcp add lore -- rac mcp
-
Enforce in CI so bad knowledge never lands:
rac validate rac/ && rac gate rac/
Install
| Command | Gets you |
|---|---|
pip install rac-core |
the rac CLI + the lore MCP server |
pip install 'rac-core[ingest]' |
+ DOCX / HTML import |
pip install 'rac-core[ingest-all]' |
+ PDF / PPTX / XLSX import |
pip install 'rac-core[explorer]' |
+ the terminal Explorer (rac explorer) |
Requires Python 3.11+. uv tool install rac-core also works.
How it works
- Typed Markdown, in your repo. Every artifact is plain Markdown with a tiny frontmatter envelope; the engine classifies it deterministically and validates it against a per-type schema.
- Read-only at serve time. The MCP server only ever reads; the trust boundary is human PR review, and the agent cannot mutate the store.
- Enforced at write time.
rac validateandrac gatereject malformed artifacts, broken or ambiguous links, and references to superseded decisions — in CI, before the knowledge lands. - Air-gapped by design. The engine makes no LLM calls and no network calls;
the only egress is a consent-gated, content-free usage ping that is off by
default, and regulated installs can prove it stays off with
rac telemetry off --enterprise(security posture, ADR-086).
Connect your agent
Claude Code (from your repo root):
claude mcp add lore -- rac mcp
Claude Desktop / Cursor (mcpServers in the client config):
{
"mcpServers": {
"lore": { "command": "rac", "args": ["mcp", "--root", "/absolute/path/to/your/repo"] }
}
}
Author and enforce artifacts
rac quickstart # set up identity + scaffold your first artifact
rac new decision adr.md # scaffold a typed artifact (mints the id)
rac validate rac/ # check every artifact in a directory
rac inspect requirement.md # see its type and completeness
rac review rac/ # full repository review, worst problems first
rac gate rac/ # the merge gate: validate + relationships + review
Import an existing decision
Already have decisions in Confluence, Notion, or loose Markdown? The rac-import
agent skill turns one existing document into one valid artifact, with a
human-review step before anything is written:
rac skill install rac-import
Then ask your agent, in plain language: "import this decision doc into Lore." It
drafts from only what your document says, shows you the proposed type, title,
and relationships to confirm, scaffolds with rac new, and closes on
rac validate. For multi-format or bulk conversion, use the rac-ingest skill.
Export the corpus
rac export rac/ --html --out lore.html # the Portal: the whole graph, one file
rac export rac/ --okf # a conformant Open Knowledge Format bundle
rac export rac/ --documents # JSONL for memory/RAG backends
rac export rac/ --graph # the typed decision graph for graph backends
The --documents and --graph modes feed external memory, RAG, and graph tools
so an agent can recall fuzzily there and then verify in Lore — see the
CLI reference. The connectors
themselves live in the separate lore-connectors companion.
Python API
The engine is a library too; its public surface is rac.__all__.
from rac import parse_file, classify, find_artifacts
art = parse_file("rac/decisions/adr-001-markdown-first.md")
print(classify(art).type) # -> "decision"
result = find_artifacts("rac/", "caching") # returns a SearchResult
for hit in result.matches:
print(hit.id, hit.title)
How it relates to OKF
Google's Open Knowledge Format (OKF) standardises the carrier — a Git tree of
Markdown with YAML front matter — and is deliberately permissive. RAC writes that
same carrier and adds what OKF leaves to the consumer: write-time enforcement
in CI. rac validate and rac relationships --validate reject malformed
artifacts, broken links, and references to superseded decisions, deterministically,
before the knowledge lands. rac export --okf turns any RAC repo into a conformant
OKF bundle — so the two compose rather than compete.
Who it's for
- Teams running coding agents heavily (Claude Code, Cursor) tired of the agent ignoring decisions the team already made.
- Teams who already write ADRs and want those decisions to actually shape what the agent does.
- Anyone who wants the why behind their software versioned alongside the code.
Documentation
Full documentation: https://itsthelore.github.io/rac-core/
- Quickstart — install and author your first artifact
- MCP server — tools, client configuration, examples
- CLI reference — every command, flag, and exit code
Origin
Lore is the product surface of RAC — Requirements as Code, the open-source
engine underneath; the package, CLI, and MCP server ship under the rac name, and
lore is the server identity and brand.
Wayfinder, the deterministic
prompt-complexity router, began as a route experiment inside RAC and was split
into its own tool — routing is a runtime concern, not a knowledge one.
Repository layout
rac-core/
src/rac/ the engine: CLI, core, services, output, the in-process MCP
server (rac mcp), and bundled skills, templates, and git hooks
rac/ the dogfood corpus — requirements, decisions, designs, roadmaps,
and prompts that govern the project itself
tests/ per-service batteries plus core / cli / artifacts coverage (ADR-027)
docs/ the documentation site (MkDocs)
examples/ the grounding demo, woven into the corpus and the test fixtures
rac-localview/ the Portal / graph viewer, vendored into the engine
Test
pip install -e .[dev]
python -m pytest
ruff check, ruff format --check, and mypy src/ run in CI alongside the
per-service batteries (ADR-027).
Project status
Lore is early and evolving quickly. The MCP server ships today. Contributions, ideas, and experiments welcome — see CONTRIBUTING.md.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rac_core-2026.6.5.tar.gz.
File metadata
- Download URL: rac_core-2026.6.5.tar.gz
- Upload date:
- Size: 9.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18b792191aa755a54be073c2030631072d10a9b1895003b1505e4c9c02917b75
|
|
| MD5 |
5292b3d7afe27a2b567f617f0ed806a1
|
|
| BLAKE2b-256 |
f3fcfa7afaa9970677f1d75f6c2e3cad2517c13f47ea09af436cd4dfcdf9f5b9
|
Provenance
The following attestation bundles were made for rac_core-2026.6.5.tar.gz:
Publisher:
python-publish.yml on itsthelore/rac-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rac_core-2026.6.5.tar.gz -
Subject digest:
18b792191aa755a54be073c2030631072d10a9b1895003b1505e4c9c02917b75 - Sigstore transparency entry: 1986576068
- Sigstore integration time:
-
Permalink:
itsthelore/rac-core@e73250d4039d2a758f69c519f827420ae00478d3 -
Branch / Tag:
refs/tags/2026.06.5 - Owner: https://github.com/itsthelore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e73250d4039d2a758f69c519f827420ae00478d3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rac_core-2026.6.5-py3-none-any.whl.
File metadata
- Download URL: rac_core-2026.6.5-py3-none-any.whl
- Upload date:
- Size: 409.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06415ee7e89804d945733178410dc3dbe4e1dba42a2115a49a3743382368aab2
|
|
| MD5 |
9f9aacbdabb9f30513a4b063b588be84
|
|
| BLAKE2b-256 |
02d8f072d8d547606d3fbf960f8c938cd42ea3dada93e88db8b047b1ef1799df
|
Provenance
The following attestation bundles were made for rac_core-2026.6.5-py3-none-any.whl:
Publisher:
python-publish.yml on itsthelore/rac-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rac_core-2026.6.5-py3-none-any.whl -
Subject digest:
06415ee7e89804d945733178410dc3dbe4e1dba42a2115a49a3743382368aab2 - Sigstore transparency entry: 1986576186
- Sigstore integration time:
-
Permalink:
itsthelore/rac-core@e73250d4039d2a758f69c519f827420ae00478d3 -
Branch / Tag:
refs/tags/2026.06.5 - Owner: https://github.com/itsthelore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e73250d4039d2a758f69c519f827420ae00478d3 -
Trigger Event:
release
-
Statement type: