Skip to content

law-ai documentation

Every document in this repository, one line each — start with the root README, and see AGENTS.md for how to work here.

Backlog of record: BACKLOG.md, the append-only file backlog declared in .github/sdlc.yml. New to the codebase? Read philosophy.md, architecture.md and constitution.md first. Pages under reference/ are generated from source and say which command rebuilds them.

Repository root

Document What it covers
AGENTS.md Law AI's direction is to become the ultimate open home for all things legal: data, tools, resources and transparency, with queryable and auditable case law and statutes, a citation knowledge graph, cited AI, LSAT and legal study, and…
CHANGELOG.md Release history: the notable changes in each version, newest first.
SECURITY.md Supported versions and how to report a vulnerability privately.
BACKLOG.md Law AI's backlog of record: append-only BL-YYYYMMDD-NN follow-ups in Open, Claimed and Done, linted by scripts/backlog_lint.py.

docs/

Document What it covers
docs/agent-roles.md Every agent that exists or is planned — its status (Live, Stub, Not started), responsibilities, tools and the module that implements it.
docs/api-examples.md Copy-paste curl examples for the public REST endpoints, with the per-scope API keys each router checks.
docs/app-shell-architecture.md A generic Next.js design for an enterprise app shell over hierarchical, inheritable settings scopes — the essay spec 040 adapted, not a plan to implement as written.
docs/architecture.md The system diagram, component responsibilities, data flow, autonomy loop, scanned-page intake, LSAT delivery channel and the rationale behind each technology choice.
docs/constitution.md The rules every spec, plan and PR must satisfy to be valid — mission, locked stack, quality gates, provenance, HITL, testing, security, autonomy invariants and jurisprudential honesty.
docs/core-schema.md The shared contract for Law AI's model of the legal system — jurisdictions, authorities, instruments, actions and governance links — and for the agent loop that ingests, structures and reviews them, with the specs that implement it.
docs/data-model.md The Neo4j knowledge-graph schema — nodes, relationships and mandatory provenance properties — and the Postgres quarantine that ingestion writes to.
docs/data-sources.md The open legal corpora Law AI ingests — URL, license, auth, rate limit and status for each — with a sample command for every ingester.
docs/django-conventions.md How to work inside the backend/law_ai/ Django package: the settings split, async ORM discipline, Channels routing, Celery naming, migration gotchas and strict typing.
docs/e2e-testing.md The browser end-to-end harness: what the Playwright suite covers that the jsdom unit tests cannot, how to run it, and what it deliberately does not do.
docs/lawmode-migration.md The plan for folding the imported lawmode/ legal reviewer into law-ai: every piece mapped to its destination, the phases Claude Code implements, and the retirement step that waits for Amr's OK.
docs/legal-ai-governance-framework.md The epic for a global, machine-readable framework of law, governance, policy and procedure — including the in-force and emerging legal regime for AI models — with a build-vs-adopt survey of rules-as-code, legal-LLM and open-data prior art…
docs/legalbench.md How the LegalBench harness runs and scores the tracked subsets, how the real data is cached, and how the baseline and regression gate decide a pass.
docs/llm-provider-chain.md Reference for law_ai.core.llm: how the ordered provider chain picks a tier and audits every call, and how the Claude, xAI and Ollama tiers are configured.
docs/local-ai.md The operator manual for the local AI substrate — Ollama, LangGraph checkpointers and Phoenix — across laptop, GPU workstation, server and air-gapped installs.
docs/lsat-answer-shuffling.md Why and how a served LSAT question's answer choices are permuted per attempt and graded back through a signed token, on the platform and the static site.
docs/lsat-library.md The LSAT knowledge library: where articles and the concept catalog live, the entry template and Markdown dialect, search, and the maintenance loop.
docs/lsat-playbooks.md LSAT question-type playbooks: how each type is recognised and solved, how bank items get their type stamp, and the Diagnose-first exercise, contrast variations and judge-driven rewrites built on them.
docs/lsat-solve-guides.md The solve-guide runbook: what a guide is, where it lives, and how guides are backfilled, judged and promoted through the review queue.
docs/lsat-static.md The architecture of the static LSAT site — how practice content reaches the GitHub Pages export, what gates it, and which specs shaped it.
docs/lsat-synthesis.md The deterministic item-synthesis engine: skeletons whose keys a finite-model checker proves, domain packs that vary the surface, and difficulty that is measured rather than declared.
docs/philosophy.md What we believe law is, what that makes a legal-intelligence system responsible for, and which of those beliefs are binding rules rather than opinions.
docs/prd.md The product requirements for Law AI — problem, users, goals, prioritized features, agent specifications, UX and the roadmap; open work is tracked in BACKLOG.md.
docs/related-github-repos.md Open-source projects, by category, that Law AI can build on for agents, legal NLP, knowledge graphs, GraphRAG, data pipelines, benchmarks and visualization.
docs/security.md The API-token and session model that gates the /api/* routers: threat model, scope matrix, token lifecycle, rate limits, auditability and the production hardening checklist.
docs/spec-driven.md How Law AI runs the fleet's spec-driven SDLC loop by reference: what this repo keeps, which gates enforce it, and where the shared machinery lives in the hub.
docs/ui-ux-review.md The repeatable UI/UX review pass — the rubric, what counts as visual evidence, and the mechanical ux_audit.py contract each fix is promoted into.
docs/ui-ux.md Every user-facing surface, what actually ships versus what docs once claimed, the token and component inventory, and the design-system contract new UI follows.
docs/adr/ The index and format of Law AI's Architecture Decision Records — the decisions that amend or deviate from the constitution.
docs/amendments/ The append-only log of numbered amendments to the law-ai constitution, with their status.

docs/history/

Document What it covers
docs/history/2026-04-proposal.md The original April 2026 technical proposal, kept as a historical record — its architecture section is out of date, so read architecture.md for the current system.
docs/history/2026-11-core-schema-draft.md The original November 2026 draft of the core schema spec, kept verbatim as a historical record — read core-schema.md for the reviewed, living version.

docs/reference/

Document What it covers
docs/reference/http-routes.md Every route the Django backend serves, grouped by mount, with the methods its view defines and the first line of the view's docstring — generated from the URLconf.
docs/reference/make-targets.md Every make target in the Makefile, grouped as make help groups them, with the VS Code task that runs it — generated from the Makefile and .vscode/tasks.json.