Skip to main content

RAC — lint and diff product requirements written in Markdown.

Project description

Lore

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

CI PyPI Python License: MIT

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. It is built on RAC — Requirements as Code, the open-source engine underneath; the package, CLI, and MCP server ship under the rac name.

Install

pip install requirements-as-code

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

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             # one command: set up identity + scaffold your first artifact
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 export rac/ --html --out lore-export.html    # the Portal, one file

Importing an existing decision

Already have decisions in Confluence, Notion, or loose Markdown? The rac-import agent skill turns one existing document into one valid RAC artifact, with a human-review step before anything is written.

rac skill install rac-import   # installs into .claude/skills/ (Claude Code / Cursor auto-discover)

Then ask your agent, in plain language: "import this decision doc into RAC" (paste the text or give a path). The skill reads the real schema with rac schema, drafts the artifact from only what your document says, and shows you the proposed type, title, and any relationships to confirm or correct before it writes a file. It scaffolds with rac new (which mints the id), then closes on rac validate — and offers fixes if validation fails, so it never leaves an invalid artifact behind. It is single-document by design; for multi-format or bulk conversion use the rac-ingest skill.

Who it's for

  • Teams running coding agents heavily (Claude Code, Cursor) who are 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.

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: an OKF consumer must not reject a bundle for missing fields, unknown types, or broken links. 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 or ambiguous links, references to superseded decisions, and relationship edges a type does not support — deterministically, before the knowledge lands. OKF is read-optimised interchange; RAC is write-time enforcement, and rac export --okf turns any RAC repo into a conformant OKF bundle — so the two compose rather than compete.

Documentation

Full documentation: https://tcballard.github.io/requirements-as-code/

Project status

Lore is early and evolving quickly. The MCP server ships today. Contributions, ideas, and experiments welcome — see CONTRIBUTING.md.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

requirements_as_code-0.19.0.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requirements_as_code-0.19.0-py3-none-any.whl (297.8 kB view details)

Uploaded Python 3

File details

Details for the file requirements_as_code-0.19.0.tar.gz.

File metadata

  • Download URL: requirements_as_code-0.19.0.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for requirements_as_code-0.19.0.tar.gz
Algorithm Hash digest
SHA256 d110db8b01eda6aa38ce0a7c2d64036ff68196606201d4e607350e51e1939cff
MD5 c4c0285b418b08ddd3fa61918959407f
BLAKE2b-256 287c9b9208805b905b158bf7b24076016ea9e683fdb945f690fc1519594d8a73

See more details on using hashes here.

Provenance

The following attestation bundles were made for requirements_as_code-0.19.0.tar.gz:

Publisher: python-publish.yml on tcballard/requirements-as-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file requirements_as_code-0.19.0-py3-none-any.whl.

File metadata

File hashes

Hashes for requirements_as_code-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ce6f2839e88e76097936a8af2a5d2505db76228d472618ee0e17666abafa50c
MD5 ee7d20e78f31b1e933a5d0b10b07803c
BLAKE2b-256 1615cbc92eea48934a9e24a44a1f3fc91ca270ab3fd50e680eb1e93b65c88c5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for requirements_as_code-0.19.0-py3-none-any.whl:

Publisher: python-publish.yml on tcballard/requirements-as-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page