Turn with the arrow keys, a swipe, or the page corners.
Legal concepts, the law beneath them, and the machine that keeps them honest
HAQQ Labs · public edition · October 2026Every chapter is one spread. The left page tells the story. The right page is a plate: a drawing that assembles itself when you turn to it.
illustrative shows a shape, not a fact from the graph reported how other systems describe themselves
This is the public edition of an internal HAQQ field guide. It keeps the chapters on method. The graph's own data stays closed, so no figure here is a count read from it.
The graph is a research project. Most concepts still carry an open review flag, and each country's entries need sign-off from a lawyer there before anyone relies on them. It is not legal advice.
A field guide to how HAQQ classifies the law, in nine plates
HAQQ Labs
Beirut · October 2026
| I | The unit is a concept | 5 |
| II | Anatomy of a concept | 7 |
| III | The relations | 9 |
| IV | Across borders | 11 |
| V | A children's curriculum, filled with law | 13 |
| VI | How a concept is verified | 15 |
| VII | The radar | 17 |
| VIII | Bedrock: the law layer | 19 |
| IX | Neighbouring species | 21 |
| Glossary · Sources | 23 |
The taxonomy is a graph of legal concepts. Each one is a single teachable idea, linked to what you must learn first, to its counterpart in other countries, and to the official text behind it.
This book explains how that graph is built and checked. It leaves out what stays inside HAQQ: the graph's figures, its coverage, and the working record of the team that builds it.
Plates I to IV describe the graph. V gives its ancestry. VI to VIII show how it is checked against the law and kept current. IX sets it beside other ways of classifying law.
Biology classifies species. Westlaw classifies headnotes. Libraries classify shelves. The HAQQ Legal Graph classifies concepts: one teachable legal idea, such as consideration, promissory estoppel or the UAE end-of-service gratuity.
Each concept is a node. It links to what you must understand first, to how it relates to other concepts, to its equivalent in other countries, and to the authority behind it.
Concept types: doctrine, rule, standard, procedure, skill, instrument.
Grounding. When HAQQ answers a legal question, the graph says which concepts are involved, what the user must know first, the equivalent rule elsewhere and which law backs it.
Fig. 1. The ranks are a browsing tree. The working structure is a graph: a concept links sideways across areas and countries. illustrative
Language-model agents drafted the concepts in parallel, one agent per area or country. Every record carries the same fields, so a second judge can test it.
Make the unit one teachable idea, give every relation a reason and a strength, give every term a source, and run a validation script on every change.
Fig. 2. The shape of one record. Values are written for this plate, not read from the graph. illustrative
Prerequisites say what to learn first. They are checked to contain no cycles, so every concept has a learning path back to first principles.
Typed relations say how two concepts stand to each other: refines, contrasts-with, exception-to, commonly-confused-with, and the largest family by far, equivalent-to across borders.
They turn the graph into learning paths. "What do I need before specific performance?" becomes a walk along the prerequisite links.
| Relation | Says |
|---|---|
| prerequisite | learn this first |
| equivalent-to | same rule, other country |
| refines | a narrower case of |
| contrasts-with | easily set against |
| exception-to | carves out of |
| commonly-confused-with | often mistaken for |
Fig. 3. An illustrative neighbourhood, and the six kinds of link. illustrative
Every equivalent-to link crosses a jurisdiction boundary. Concepts stay native to their country and are linked, never merged or translated.
Lebanon's notice period (مهلة الإنذار) is linked to Oman's, not translated into it. The two rules play the same role, and each keeps its own wording, conditions and authority.
A scope is any system with its own law: a country, a sub-national system such as a US state, or a free zone such as DIFC, ADGM or QFC.
Fig. 4. The shape of the layer, drawn for this plate. illustrative
The shape comes from education. The Marble Skill Taxonomy is an open dataset of what children aged 6 to 12 learn: micro-topics linked by prerequisite edges, each hard or soft, with a reason, aligned to school curricula.
The legal graph kept that edge shape and swapped curriculum standards for official law as ground truth.
The shape of a prerequisite: what to learn first, how strongly, and why. Everything a concept says about the law comes from the law.
| Marble | Legal Graph | |
|---|---|---|
| Unit | Micro-topic | Concept |
| Grouping | Subjects and clusters | Areas and clusters |
| Edges | Prerequisites, hard or soft, with reason | Same, plus typed relations and cross-border equivalents |
| Mastery | Evidence and assessment prompt | Hypothetical and reasoning prompt |
| Truth | Curriculum standards | Official law, quote-checked by code |
Fig. 5. What came from the classroom, and what came from the law. illustrative
Every change must quote the official text it rests on. Plain code must find that quote on the page. A judging model must agree the text supports the change. A refuter agent must fail to break it. Then strict merge gates run.
A change that fails goes to a fixer, which rewrites it from the law and sends it through the same checks again. A concept rejected three times goes to a person.
A model can be wrong about what a law says. A quote either is on the official page or it is not, and plain code can tell the difference every time.
Fig. 6. The verification loop, step by step. illustrative
Law changes. Every week, one plain-code reader per official gazette looks for new and amended laws, with no agents involved. A heartbeat alert fires if a reader goes quiet.
Weekly today; daily is the goal.
Fig. 7. One sweep of the weekly radar. Positions are decorative. illustrative
Under the concepts sits the law itself. Each market's official list of laws is read, every text is fetched, scans are run through OCR, and each law is split into articles.
A concept is grounded in the article it rests on, with a pinpoint and a quote. Repealed or superseded law is kept and flagged, and it never answers.
Only official texts: legislature, gazette, ministry, regulator, court. Aggregators can help find a law but never prove it. Bot challenges and logins are never bypassed.
Fig. 8. The law layer's data model. Every edge carries a trust level, and every passage a source tier, from official to finder. illustrative
Westlaw files headnotes under Key Numbers, written by attorney-editors. Lexis tags headnotes with algorithmic topics. The Library of Congress shelves books by jurisdiction. HAQQ classifies concepts and grounds them in official text.
Never ingest another publisher's headnotes, key numbers, topics or citator signals into the graph. Its ground truth is the official text alone.
Open standards to map to: ELI, Akoma Ntoso and ECLI for legislation and case law, and SKOS for linking concepts across schemes.
| Westlaw | Lexis | HAQQ graph | |
|---|---|---|---|
| Unit | Headnote | Headnote | Concept |
| Built by | Editors | Algorithm | Agents vs official text |
| Borders | US-wide topics | Same | Linked across countries |
| Currency | KeyCite | Shepard's | Weekly radar |
Fig. 9. What each system treats as its unit. reported
| Concept | One teachable legal idea: rule, doctrine, standard, procedure, skill or instrument. |
| Scope | The jurisdiction a concept belongs to, free zones included. |
| Prerequisite | What to understand first. Hard or soft, with a reason. |
| Equivalent-to | The matching rule in another scope. Linked, never merged. |
| Grounding | A verified quote tying a concept to the exact article. |
| Judge model | A pinned model that checks a change against the text. It judges form, not truth. |
| Refuter | An agent whose job is to prove a change wrong. |
| Radar | Weekly gazette readers for new and amended laws. |
| Wording | One dated version of an article. |
| Tier | How far a source can be trusted, 1 to 4. |
| Bitemporal | Two timelines: when the law applied, when we believed it. |
The graph's data, counts and coverage stay inside HAQQ. Nothing in this edition is legal advice.
One teachable idea at a time, each tied to the law it rests on.
HAQQ Legal AI · public edition