Proposal · v0.1 discussion draft · 2026-05-21 · Deutsch
Open Law Standards
Six open standards for the identification, structuring, publication and verification of Swiss court decisions. Where international standards exist — don't reinvent. Where they don't — make a simple, documented proposal and ship the reference implementation alongside.
Why open standards
Rationale
Swiss court decisions are public works (URG Art. 5 para. 1) and therefore in the public domain. Yet seamless machine access is not a given today:
- Every source mints identifiers by its own convention. The same BGE decision has five different URLs in five different databases.
- Most cantonal portals serve PDFs or HTML with no machine-readable structure — every consumer reconstructs the Sachverhalt / Erwägungen / Dispositiv from scratch.
- Citations between decisions are plain-text strings (
BGE 140 III 86) — every consuming application has to resolve them itself, with varying precision. - There's no cryptographically verifiable proof that a cited decision-text is the one actually published. In the age of hallucinating AI tools, that's the central trust question.
Four of the six proposed standards profile existing international specifications for the Swiss context (Schema.org/LegalCase, Akoma Ntoso, Markdown, ELI). Two are Swiss-native proposals: the cli:ch Caselaw Identifier (with ECLI as a deterministic European projection), because existing identifier schemes flatten Swiss specifics — trilingualism, cantonal sovereignty, pinpoint addressing; and a provenance layer (Merkle root per publish, Bitcoin-anchored) that the legal-data world doesn't yet have.
This is not a manifesto, not a demand on federal courts or cantons. It's an open discussion draft. The proposal is intentionally small and compatible: each Bestimmung can be adopted independently without blocking the others.
The six standards
Summary
Identification
cli:ch — Swiss Caselaw Identifier (primary) · ECLI as European projectionEvery decision carries two deterministically linked identifiers: cli:ch as the canonical Swiss form and ECLI as the lossy projection for European interoperability.
cli:ch makes five features of Swiss jurisprudence first-class that ECLI flattens:
- Trilingualism — DE/FR/IT versions of a BGE are legally equally authentic texts (Art. 14 PublG). cli:ch treats language as a first-class axis via
?lang=. - Cantonal sovereignty — 26 distinct judicial systems remain visible (
cli:ch:zh:…,cli:ch:ti:…), not collapsed into an opaque court code. - Pinpoint addressing — Erwägung-level citation is first-class via
#e-2.3(Swiss citation convention). - Chamber granularity — Obergericht, Verwaltungsgericht, Sozialversicherungsgericht etc. remain explicitly named instead of disappearing into a three-letter code.
- Versioning —
@YYYY-MM-DDaddresses a specific anonymization version; rare but legally relevant when needed.
cli:ch:bge:140-III-86 cli:ch:bge:140-III-86?lang=fr (French version of the same BGE) cli:ch:bge:140-III-86#e-2.3 (pinpoint to Erwägung 2.3) cli:ch:bger:6B_1234/2025 cli:ch:bvger:A-1234/2024 cli:ch:zh:obergericht:LB230012 (canton of Zurich, Obergericht) cli:ch:ti:tribunale-appello:34.2025.27 (canton of Ticino, Tribunale d'appello) cli:ch:finma:2024-12345 (FINMA decision)
Form: cli:ch:<court>[:<chamber>]:<docket>[@<version>][?lang=<l>][#<pinpoint>]. Federal courts without a canton prefix; cantonal courts with the ISO 3166-2 canton code plus the canton-native court designation. The identifier model parallels the FRBR layers of Akoma Ntoso (Work / Expression / Manifestation) — we're not inventing, we're applying an established model with Swiss labels.
ECLI as projection for European resolvers: an ECLI is deterministically derived from every cli:ch (pure function cli_ch_to_ecli). The projection is many-to-one — language, pinpoint, version and chamber detail are not preserved.
cli:ch:bge:140-III-86 → ECLI:CH:BGE:2014:140.III.86 cli:ch:bger:6B_1234/2025 → ECLI:CH:BGER:2025:6B_1234.2025 cli:ch:zh:obergericht:LB230012 → ECLI:CH:ZHO:2023:LB230012
Why a Swiss-native form as primary? Because Swiss jurisprudence has features — trilingual authentic texts, 26 sovereign cantonal judicial systems, pinpoint citation at Erwägung level — that necessarily collapse into a single flat axis in any general European scheme. cli:ch makes them first-class; ECLI provides European compatibility. Both together are more than either alone.
Existing internal identifiers (Geschäftsnummern, dossier numbers) remain unchanged — cli:ch and ECLI are additional, standardised layers.
HTTP resolver: https://opencaselaw.ch/cli/ch/<court>[/<chamber>]/<docket> resolves any cli:ch URI to the canonical decision page in one HTTP hop (302 redirect). URL fragments (#e-N-M pinpoints) are preserved by browsers across the redirect.
Reference implementation: cli_ch.py mints cli:ch URIs deterministically; cli_ch_to_ecli() is the projection function; cli_ch_to_decision_id() is the inverse used by the resolver.
cli_ch.py on GitHub ·
ecli.py on GitHub.
Metadata
Schema.org / LegalCase (JSON-LD)Every decision page carries a Schema.org LegalCase block as JSON-LD in its <head> with both identifiers (cli:ch + ECLI), court, date, language, regeste, outbound case and statute citations.
{
"@context": "https://schema.org",
"@type": "LegalCase",
"identifier": [
{"@type": "PropertyValue", "propertyID": "cli:ch", "value": "cli:ch:bge:140-III-86"},
{"@type": "PropertyValue", "propertyID": "ECLI", "value": "ECLI:CH:BGE:2014:140.III.86"}
],
"name": "BGE 140 III 86",
"datePublished": "2014-04-15",
"inLanguage": "de",
"court": {"@type": "GovernmentOrganization", "name": "Bundesgericht"},
"citation": [...], // outbound case citations
"legislationCited": [...] // outbound statute citations
}
This does two things: search engines index the decision with rich-result support, and AI agents get a machine-readable record without web scraping.
Reference: every page at opencaselaw.ch/entscheid/<id> serves this block. Implementation in seo_pages.py.
Structure
Akoma Ntoso 3.0 (XML)Where an XML representation of the decision is required, follow Akoma Ntoso 3.0 (the UN/OASIS standard for legislative and judicial documents). Sachverhalt, Erwägungen, Dispositiv and Regeste in the standard elements — don't invent a new XML language.
Akoma Ntoso is the least painful path: already in production in Italy, Brazil, the European Union and the UN. Swiss specifics (Schweizer Citation, cantonal Geschäftsnummern, multilingualism) embed as optional metadata attributes without warping the core schema.
Status: partially live in OpenCaseLaw (Materialien v0.2 uses Akoma Ntoso for Botschaften). Full XML output for court decisions is roadmap item 2026 Q3.
Full text
Markdown with Erwägung anchors (Schweizer Citation)For the machine-readable full-text representation: Markdown with HTML anchors on every Erwägung, named after the Schweizer Citation convention (E. 2.3 → #e-2-3).
# BGE 140 III 86
## Sachverhalt {#sachverhalt}
...
## Erwägungen
### E. 2.1 {#e-2-1}
...
### E. 2.3 {#e-2-3}
The central holding goes here...
## Dispositiv {#dispositiv}
1. Die Beschwerde wird abgewiesen.
This lets you pinpoint-link to any Erwägung — the lifeblood of legal citation practice. Tools can cite and verify individual Erwägungen without reparsing the full decision.
Reference: opencaselaw.ch/entscheid/bge_BGE_140_III_86#e-2-3 jumps directly to Erwägung 2.3.
Citations
Resolved, machine-readable, bidirectionalEvery citation of another decision or statute is resolved: not just as a plain-text string, but linked to a concrete cli:ch (case, primary — ECLI projection available) or ELI URI (statute). Bidirectional — both outbound (what this decision cites) and inbound (who cites this decision).
This makes the Swiss citation graph a shared substrate for doctrine tracking, leading-case detection, appeal-chain tracing. Exactly the material AI tools need to verify what's cited — instead of hallucinating.
Status: 6.46 M case-citation edges + 11.3 M statute-citation edges, regenerated daily, queryable via the find_citations / find_appeal_chain / find_leading_cases MCP tools and the REST API.
Provenance
RFC-6962 Merkle anchor · OpenTimestamps-Bitcoin · live since 2026-05-21Every publish of the corpus computes an RFC-6962 Merkle tree over all decisions. Each leaf commits to (decision_id, cli:ch, ECLI, content_hash, decision_date). The root is:
- committed to the public Git repository (
docs/integrity/<YYYY-MM-DD>.{root,json}) — daily, ~700 bytes per publish, - anchored to the Bitcoin blockchain via OpenTimestamps (
.root.otsfile, ~945 bytes per publish, free, upgraded to fully Bitcoin-anchored after ~1 block). - served as a per-decision inclusion proof via API:
GET /api/integrity/<decision_id>returns the RFC-6962 inclusion proof against today's root.
Any cited decision-text can be bit-exactly verified against the publish-root — without trusting opencaselaw.ch. Hallucinations aren't prevented by promises but proven absent by mathematics.
Status: in production since 2026-05-21. The hashing convention (RFC 6962, the same as Certificate Transparency) and the leaf schema are documented at opencaselaw.ch/integrity/. This is the only one of the six standards that doesn't profile an existing scheme — the convention itself will be consolidated publicly at openlawstandards.ch.
Reference implementation
OpenCaseLaw.ch
The six standards are not hypothetical. All six are in production at OpenCaseLaw.ch (Akoma Ntoso for Materialien is live, for court decisions it's on the roadmap):
- 01 Identification: cli:ch (Swiss form, primary) plus ECLI (European projection) for all 972,000+ decisions; both deterministically minted on demand, visible in every API response and every
/entscheid/<id>page. HTTP resolver at/cli/ch/.... - 02 Metadata: Schema.org/LegalCase JSON-LD on every decision page, with cli:ch + ECLI in the
identifierarray, citation and statute graph. - 03 Structure: Akoma Ntoso for Materialien (Botschaften) already in production. For court decisions: roadmap Q3 2026.
- 04 Full text: Markdown with Erwägung anchors, Schweizer-Citation-conformant. Pinpoint links like
/entscheid/bge_BGE_140_III_86#e-2-3work today. - 05 Citations: 6.46 M resolved case edges + 11.3 M statute citations, regenerated daily, bidirectional.
- 06 Provenance: in production since 2026-05-21 — daily RFC-6962 Merkle root over all decisions at
docs/integrity/<date>.root, OpenTimestamps-Bitcoin-anchored (.root.ots), per-decision inclusion proof via/api/integrity/<decision_id>. Documented at opencaselaw.ch/integrity/.
Roadmap
Open Law Standards as a separate site
- Q3 2026: openlawstandards.ch launches as a dedicated site. RFC-format per Bestimmung. Open public comment phase.
- Q3 2026: Akoma Ntoso XML output for court decisions (extending the Materialien pipeline).
- Q4 2026: Outreach to Verein Entscheidsuche.ch, Bundesgericht, University of Berne Institute for Legal Informatics, ETH AI Center, other Swiss legal-data providers. Goal: shared adoption of selected Bestimmungen.
- 2027: Extension to Liechtenstein, Austria, Germany if interest exists — the standards aren't Switzerland-specific.
Contact
Discussion + collaboration
This is a discussion draft. Comments, corrections, alternative proposals welcome via:
- GitHub Issues at github.com/jonashertner/caselaw-repo-1
- Email: team@jonashertner.com
German version: opencaselaw.ch/standards/