Lex Browse everything How it works For developers

Architecture

the evidence layer, the article layer, the signed indexes, and why you don't have to trust us

Lex answers one question, what did the rule say on that date?, for Luxembourg law and ten EU acts, in a way a developer can build on and an auditor can check. Everything below is open source and open data.

Two layers, one hash chain

EVIDENCE LAYER (append-only, verbatim)          CONSUMPTION LAYER (regenerable, clean)
lex-corpus-lu-legilux   lex-corpus-eu-eurlex   lex-articles
the exact bytes the state published       →   per-ARTICLE Markdown + JSON
sha256 per file, observation chains            stable publisher-minted anchors
                                               validity intervals per provision
             deterministic, versioned,          per-anchor history + renumbering events
             IMMUTABLE extraction profiles          │
             (akn-lu/1, xhtml-eu/1, code,          ▼
              never an LLM)                    signed SQLite indexes (lex-index/2)
                                               provisions + FTS + time axis, ECDSA-P256 stamp
                                                    │
                    this site · /mcp (any MCP client) · datasets

Every provision's text_sha256 chains to a verbatim-file sha256 in the evidence repo: re-run the pinned open-source extractor on the state's bytes and you get these bytes. Verify it yourself, the defence is never "trust Lex".

The retrieval unit is the article

Search hits, as_of (with outline and select modes), and the article_history tool all operate per provision. "What did Article 92 say over its life?" is a file read: every distinct text as a validity interval, plus mechanically detected renumberings (identical-hash matching, never interpretation).

Honesty as an API contract

refusal statusmeaning
no_version_for_datethe work exists; no version was valid on that date
unknown_work / unknown_anchorLex does not hold it, and says so
anchor_not_in_versionthat article did not exist in that version (knowing this IS the product)
text_withheldmetadata held, text gate not cleared; official link provided
outside_observed_windowbefore the observation history begins

A flagged wrong answer is still wrong, so Lex refuses instead; coverage exists to state what we do not have. The AI layer (the front page) is additive and separated: one model + system prompt over the same in-process tool core the public /mcp serves , parity by construction; no framework, no interpretation (fitness rule F10).

Build on it

lex-articles, machine-readable corpus (CC-BY, SCHEMA.md contract) · lex, all code, Apache-2.0, incl. the full decision record (D1, D47) · evidence repos · hosted MCP: claude mcp add --transport http lex https://law.soufien.lu/mcp