Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Lore

Lore — agents that know why. Deterministic. Read-only. No RAG, no guessing.

Quickstart · How it compares · How it works · Docs · CLI · Changelog

CI PyPI Python Typed License: Apache 2.0

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

  1. Install the engine:

    pip install requirements-as-code
    
  2. Scaffold identity and your first artifact:

    rac quickstart
    
  3. Connect your agent (Claude Code, from your repo root):

    claude mcp add lore -- rac mcp
    
  4. Enforce in CI so bad knowledge never lands:

    rac validate rac/ && rac gate rac/
    

Install

Command Gets you
pip install requirements-as-code the rac CLI + the lore MCP server
pip install 'requirements-as-code[ingest]' + DOCX / HTML import
pip install 'requirements-as-code[ingest-all]' + PDF / PPTX / XLSX import
pip install 'requirements-as-code[explorer]' + the terminal Explorer (rac explorer)

Requires Python 3.11+. uv tool install requirements-as-code also works.

How it works

How Lore works: typed Markdown in your repo flows through the deterministic rac engine into the read-only lore MCP server, which serves your agent.

  • 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 validate and rac gate reject malformed artifacts, broken or ambiguous links, and references to superseded decisions — in CI, before the knowledge lands.

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/

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

Apache License 2.0.

Metadata

Release files for requirements-as-code 2026.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for requirements-as-code 2026.6.4
File Size Uploaded Provenance Actions
requirements_as_code-2026.6.4.tar.gz 8.9 MB With provenance Details for requirements_as_code-2026.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for requirements-as-code 2026.6.4
File Interpreter ABI Platform Actions
requirements_as_code-2026.6.4-py3-none-any.whl Python 3 none any Details for requirements_as_code-2026.6.4-py3-none-any.whl

Total release size: 9.3 MB

Release files / requirements_as_code-2026.6.4.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL requirements_as_code-2026.6.4.tar.gz
Size 8.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ed7cb74ed56b9397f5ff10c554a276088a46d6324afb1f9b3af5e8a345722fd8
BLAKE2b-256 checksum
How to use checksums
796fe59ef16b0ee849f60b36d5e762a3aaa4c189f07a58991481ccecefa4a2c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / requirements_as_code-2026.6.4-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL requirements_as_code-2026.6.4-py3-none-any.whl
Size 393.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64624f9c76836a23ea16758bd732b2c387f877d8a8c44fca09a01576c4c2bfab
BLAKE2b-256 checksum
How to use checksums
27486e6628660810d690189f562773cefb0a0e5973e990d7018e8de8707dd61c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Security for requirements-as-code 2026.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for requirements_as_code-2026.6.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page