In the rapidly evolving landscape of generative AI, software engineering teams are facing a persistent, high-stakes paradox: while AI coding assistants like Claude Code and Cursor have drastically increased the velocity of code generation, they lack a fundamental understanding of a project’s specific "institutional memory." Developers often find themselves in a loop where AI agents generate code that contradicts established design decisions, ignores complex architectural requirements, or repeats mistakes that the team had previously ruled out.
Enter Lore, a new, deterministic framework built on the "Requirements as Code" (RAC) paradigm. By treating documentation not as static text, but as a typed, version-controlled source of truth, Lore offers a radical departure from the probabilistic, "fuzzy" retrieval methods—such as Retrieval-Augmented Generation (RAG)—that currently dominate the AI landscape.
The Problem: The "Hallucination" of Intent
Modern development workflows rely heavily on RAG to help AI assistants navigate large codebases. However, RAG is inherently probabilistic; it relies on similarity searches to find information that might be relevant to a user’s prompt. When an AI agent needs to know a specific architectural decision, RAG might return a tangential document or, worse, a superseded decision that no longer applies.
This creates a "knowledge drift" where the AI is effectively guessing what the team wants. For large-scale enterprise projects, this leads to significant technical debt, as agents frequently violate core project constraints. Lore aims to solve this by providing a read-only, deterministic interface for coding agents to query a repository’s history, requirements, and design constraints.
Chronology of Development: From Experiment to Engine
The development of Lore began as an internal experiment within the RAC ecosystem. The objective was clear: create a system that forces AI agents to adhere to a team’s established rules.
- Initial Conception: The creators identified that while many tools focused on the runtime performance of LLMs, few addressed the knowledge integrity of the development lifecycle.
- The RAC Foundation: The "Requirements as Code" (RAC) engine was built to standardize how documentation is structured. By using typed Markdown with YAML front matter, the engine allows for programmatic validation of documents.
- The Rise of MCP: With the launch of the Model Context Protocol (MCP), the team behind Lore recognized an opportunity to create a standardized "knowledge server." This allowed Lore to transition from a static CLI tool to an active participant in the AI development environment.
- The Public Beta: Today, the
rac-corepackage serves as the engine, while "Lore" has emerged as the user-facing identity, providing an MCP server that integrates directly into the workflows of developers using tools like Claude Desktop and Cursor.
Supporting Data: Lore vs. Fuzzy Retrieval
The distinction between Lore and traditional RAG is not just a marketing preference; it is a fundamental difference in architecture. The following table illustrates why Lore’s deterministic approach is essential for mission-critical engineering:
| Feature | Lore (Deterministic) | Fuzzy Retrieval (RAG) |
|---|---|---|
| Retrieval Mechanism | Exact, current decision | Similarity-ranked |
| Reliability | Reproducible and audited | Varies by prompt/run |
| Role | Source of Truth (Read-Only) | Working index/Memory |
| CI Integration | Enforced (Gate/Validate) | Not applicable |
By implementing rac gate and rac validate in a CI/CD pipeline, teams can ensure that no code is merged if it violates the documented decisions stored within the Lore repository. This creates a "hard" guardrail that RAG systems cannot replicate, as they lack the semantic validation required to reject incorrect architectural choices.
The Mechanics of Lore: A Tiered Architecture
Lore operates through a sophisticated pipeline that ensures data integrity from the moment a developer types a requirement to the moment an AI agent accesses it.

1. Authoring as Code
Developers use the rac CLI to generate "artifacts." These are not just loose Markdown files; they are typed, unique entities. When a developer creates a new Architectural Decision Record (ADR), the CLI assigns it a unique identity and structure, ensuring it can be referenced across the entire project graph.
2. The Deterministic Engine
Unlike traditional RAG, which creates vector embeddings that can lose nuance, the Lore engine parses the repository as a structured graph. When a developer asks an AI agent, "What is our policy on database sharding?", the agent queries the Lore MCP server. The server, acting as a deterministic interface, returns the exact, current document—not a "best guess" or a summary—allowing the agent to cite the source with 100% accuracy.
3. Integration and Import
Lore is designed for adoption. It recognizes that many teams have massive amounts of knowledge locked in tools like Confluence or Notion. The rac-import and rac-ingest skills are designed to bridge this gap. These tools allow teams to convert legacy documentation into valid, typed RAC artifacts, ensuring that historical knowledge is not lost in the migration to an AI-augmented workflow.
Official Perspectives: The Vision for "Requirements as Code"
The architects of Lore define their mission as a move toward "systematized institutional memory." By treating documentation as code, the project aims to turn the documentation folder from a "graveyard of outdated files" into a "living, breathing part of the build pipeline."
"Lore isn’t a search index; it’s the source of truth," says the core development team. The project aligns itself with the Open Knowledge Format (OKF), a standard championed by industry leaders. While OKF provides the carrier (the structure of the files), Lore provides the enforcement (the ability to ensure those files are current and consistent).
Implications for the Future of AI Development
The introduction of Lore has profound implications for the industry.
1. The Death of "Hallucinated" Architectural Decisions
By grounding AI agents in a read-only, deterministic source of truth, Lore eliminates the risk of an agent "re-inventing" a system that the team previously decided against. This will likely reduce the amount of time developers spend "babysitting" their AI tools.
2. Standardizing AI Onboarding
For new team members—both human and synthetic—Lore acts as the definitive source of project identity. A new developer can query the MCP server to understand the "why" behind every decision, significantly shortening the time required to understand complex, legacy systems.
3. The Future of CI/CD
We are moving toward a future where "CI/CD" includes "Continuous Documentation Validation." As Lore matures, we can expect to see automated pipelines that block deployments if an agent’s proposed code changes are not backed by an approved, validated architectural decision.
Getting Started: The Path to Adoption
For teams looking to integrate Lore, the barrier to entry is intentionally low. The installation is managed via standard Python package managers:
pip install rac-core: Installs the CLI and MCP server.rac quickstart: Initializes the repository and scaffolds the first artifacts.claude mcp add lore: Connects the local Lore instance to the Claude agent environment.
As the tool is currently in its early stages, the community is actively seeking contributions, particularly regarding connectors to other documentation formats and advanced graph visualization tools.
Conclusion: A New Standard for Engineering
Lore represents a shift in how we think about AI and software engineering. By moving away from the "black box" approach of RAG and toward the transparent, verifiable structure of Requirements as Code, Lore gives teams the power to govern their AI agents with the same rigor they apply to their source code. As AI coding assistants become more capable, the ability to define, enforce, and verify institutional memory will not just be a luxury—it will be a requirement for any team looking to maintain stability in an increasingly automated world.

