docs.tiesa.tech · en-GB
Architecture & structure
Detailed Mermaid and sequence live here so Search and Home stay light. Mobile-friendly law search tooling is rare — this site is the blueprint for Karolis and for serious readers (including potential competitors) who want the exact structure.
1. Host → project → repo map
- tiesa.tech / www.tiesa.tech → Vercel
radau→ gitKuglys/radau(private) — apex home with three product doors (Dora, Radau, MCP). Middleware rewrites/→/apex. - radau.tiesa.tech →
radau/Kuglys/radau· Production (main) — since 2026-09-28 the Claude-lane build: DORA, NIS2 and animals-in-science packs (EN/LT) with Pack v2 tables from the originals, reader/read, BM25 with LT/EN stemming, question-type intents, 1-hop cite expand, Jev final stage (server key). - beta.radau.tiesa.tech → same project/repo · Preview / branch
beta/mcdm-topsis— Prod search plus Beta-only AHP–TOPSIS ranking lane (not merged intomain). - claude.radau.tiesa.tech → same project/repo · Preview / branch
claude/radau(branched from Beta) — next experiments (its 2026-09-28 build was promoted tomain). SeeCLAUDE-LANE.md. - dora.tiesa.tech → Vercel
dora→ gitKuglys/dora-graph-rag-prototypes(private) — frozen research PoC (Graph RAG vs Jev). Product routes unchanged. - mcp.tiesa.tech → Vercel
radau-mcp/ gitKuglys/radau-mcp. Not ondora. - docs.tiesa.tech →
radau/ Production — this page. Middleware rewrites/→/docs. Preview on any deploy:?docs=1.
All three GitHub repos are private. Profile: github.com/Kuglys.
2. Where things sit in the Radau repo
src/app/— routes:/(home),/search,/read(whole act with hit column, two-act compare),/api/jev/advisor(Jev, server-side key),/apex(tiesa.tech),/docs(this site).src/middleware.ts— host rewrites for apex + docs; preview flags?apex=1/?docs=1.src/lib/search.ts+stem.ts— MiniSearch index; terms are stemmed (Snowball LT/EN, nlp.js) and diacritic-folded, function words dropped.src/lib/text-norm.ts,intent.ts,smart-search.ts— Unicode-safe word matching, the 10 question types and the re-rank (Purpose, Tables, Body, intent boosts, intent-aware candidates).src/lib/graph-expand.ts— 1-hop cite expand; keeps the 8 most query-relevant neighbours.src/lib/mcdm/— AHP–TOPSIS (Beta: only on the beta / claude lanes, hidden and forced off on radau.tiesa.tech), Jev client (jev-openrouter.ts: intent, rank, excerpt), lane detection (beta.ts).src/lib/segments.ts,sketch.ts,tables.ts,originals.ts— semantic parts for Jev’s best part, answer sketch, table detection, links to the official and archived originals.src/components/workspace/— result cards,BlocksView(real tables), graph drawer, pipeline strip.scripts/enrich-packs.mjs— build step (Pack v2);scripts/eval/— ranking evaluation;scripts/acceptance-tables.cjs,regress-*.cjs— live checks.governance/OUP/— Karolis’s prompts, verbatim;MAINTAINING.md,CLAUDE-LANE.md— how to run and hand over the site.
3. Pack layout (Pack v2)
- Packs:
dora-en/lt,nis2-en/lt,dir2010-63-en/lt(EU Directive 2010/63 + LT B1-866). - A doc = article, recital, annex or table. IDs are
packId:localId; the samelocalIdin EN and LT lets the reader line up both languages. blocks: ordered paragraphs and tables (caption,header[][],rows[][], spans expanded). Every table is also its own doc (type: table,parentId= its annex), so “Tables only” is exact and a table can be found by its content.source: official URL + anchor; the build also archives a copy under/originals/.graph.json:citesandcovers(annex → table) edges, one graph per pack.- Tables per pack today: dir2010-63-lt 44, dir2010-63-en 36, NIS2 3 + 3, DORA 0 (its original has no annex tables).
4. From document to screen
- Offline: split the act; dir2010-63 packs are checked by Jev (title ↔ body) before publishing.
- Every build:
enrich-packs.mjsre-reads the originals and writes Pack v2 (never fails the build). - Question type: keyword cues (instant) + one Jev yes/no call per type (≈0.4 s, ≈$0.00003).
- BM25 (stemmed, stopwords dropped) + candidates that fit the question type.
- Re-rank: Purpose, Tables, Body, question-type boosts.
- Graph: 8 most relevant 1-hop citations. (AHP–TOPSIS re-rank: Beta lanes only — not ready for production.)
- Jev final stage: re-rank the top 12 on the full passage, pick the best part of the top 5; it is told the question type.
- Screen: cards (tables as tables), answer sketch, “Read in document”, “Original ↗”, Jev usage meter.
5. Quality & tests
- Ranking evaluation (
scripts/eval/, 60 EN/LT gold questions): right article first 47 → 52, in top 3 56 → 60, MRR 0.863 → 0.928 (v01.1 vs the code before it). - Table acceptance (
acceptance-tables.cjs): 8 real tables from the originals must show as tables, survive “Tables only” and open in the reader — 8/8 on production. - Live regressions: focus mode, Tables-only exits, graph click scrolling, answer-sketch deadlines, question types and Jev usage.
6. Releases & lanes
- v01.1 (2026-09-28): the Claude-lane build promoted to production — Pack v2 tables, reader, question types, stemming, Jev final stage.
- v01.2 (in progress on
claude/radau): more documents (GDPR, AI Act, CRA, CER, ISO standards) and a quick selector for groups of documents. - Work happens on a lane (
claude.radau.tiesa.tech,beta.radau.tiesa.tech), is tested there, thenmainis fast-forwarded. Rollback = promote the previous deployment in Vercel.
7. Live links
- radau.tiesa.tech — Search (Production)
- beta.radau.tiesa.tech — Beta MCDM lane
- claude.radau.tiesa.tech — Beta · Gyvūnų dokai (Claude lane)
- dora.tiesa.tech — frozen PoC
- tiesa.tech — apex doors
- mcp.tiesa.tech — MCP greeting
- GitHub orgs/repos — private (Kuglys)
Preview this docs surface on a Vercel preview URL with ?docs=1 (mirrors ?apex=1 for the home).