Jeroen1991z wires Mike into Dutch case law and legislation

A Netherlands-focused fork teaches Mike to search and cite rechtspraak.nl and wetten.overheid.nl directly.

searchi18n

Jeroen1991z has built out a serious Dutch-market localisation: Mike can now query the official Dutch case law database (rechtspraak.nl) and the national legislation register (wetten.overheid.nl), pull individual rulings and statute articles, and cite them properly. Citations render the way a Dutch lawyer expects - case law shows the specific paragraph of reasoning (r.o.), legislation shows the article, and documents show the page number. A source picker in the chat input lets users restrict Mike to case law, legislation, or both.

The work shows the usual scars of integrating with public-sector APIs - several commits iterate on the search parameters and XML parsing until results actually come back clean. Bundled into the same arc is a quieter change: the default chat model switches over to Anthropic's Claude Sonnet, which other forks importing this work may or may not want to inherit.

So what Anyone building Mike for a non-US jurisdiction should study this fork as a template for wiring in local primary sources and citation conventions.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

11 commits from Jeroen1991z/mikeNL, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
7711127a Add Dutch legal market integrations: rechtspraak.nl + wetten.overheid.nl Claude 2026-05-04 ↗ GitHub
commit body
- New `backend/src/lib/rechtspraak.ts`: API client for Dutch case law
  (rechtspraak.nl Atom/XML) and legislation (wetten.overheid.nl SRU),
  with court code → name mapping and full-text extraction capped at 15 kB.

- `chatTools.ts`: Three new agentic tools (search_case_law, fetch_case_law,
  search_legislation) registered in RECHTSPRAAK_TOOLS; handlers in
  runToolCalls emit SSE activity events; runLLMStream accepts
  `rechtspraakEnabled` param (default ON); ParsedCitation/normalizeCitation/
  extractAnnotations extended for case_law and legislation citation types;
  system prompt extended with Dutch law search strategy and citation format.

- `chat.ts` / `projectChat.ts`: Accept `rechtspraak_enabled` from request body.

- `llm/models.ts`: Claude Sonnet 4.6 is now the default model for chat,
  tabular review, and title generation.

- `types.ts`: New AssistantEvent variants for case law / legislation activity;
  MikeCitationAnnotation extended with ecli, external_url, court, judgment_date,
  title, article optional fields; MikeMessage gains `rechtspraakEnabled`.

- `mikeApi.ts`: `rechtspraak_enabled` added to streamChat / streamProjectChat.

- `useAssistantChat.ts`: Pass rechtspraakEnabled through to API; handle four new
  SSE event types with streaming placeholders and thinking indicator.

- `ChatInput.tsx`: Scale icon toggle button (default ON) for rechtspraak.nl lookup.

- `AssistantMessage.tsx`: Render case_law_searched_start/searched, case_law_fetched,
  legislation_searched event blocks with blue dot indicators.

- `ChatView.tsx`: Citation click opens external URL in new tab when
  citation.external_url is set (case law / legislation), otherwise opens
  the document side panel as before.

- `ModelToggle.tsx`: DEFAULT_MODEL_ID changed from gemini-3-flash-preview to
  claude-sonnet-4-6.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
0eba5bc1 Fix rechtspraak.nl search: use zoekterm param for keyword search Claude 2026-05-04 ↗ GitHub
The open data API uses zoekterm for full-text search, not subject.
The subject parameter is for URI-based taxonomy filtering only.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
dc55a874 Fix wetten.overheid.nl legislation search Claude 2026-05-04 ↗ GitHub
commit body
- Add required version=1.2 SRU parameter
- Use correct BWB index overheidbwb.titel instead of unsupported title/text
- Remove unsupported dcx recordSchema (use default)
- Update XML parsing to use dcterms: namespace

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
177826a6 Fix legislation XML parser for actual BWB response format Claude 2026-05-04 ↗ GitHub
Response uses <record> not <srw:record>, and has rechtsgebied
not description. Also deduplicate results by BWB ID since
the API returns multiple versions of the same law.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
633dd8d2 Add per-source search toggles and Memorie van Toelichting search Claude 2026-05-04 ↗ GitHub
commit body
- Add searchMvT function querying SGD (Staten-Generaal Digitaal) via SRU
- Split RECHTSPRAAK_TOOLS into CASE_LAW_TOOLS, LEGISLATION_TOOLS, MVT_TOOLS
- Add searchSources param to runLLMStream for per-source control
- Inject Dutch-only instruction when internet/AI knowledge is disabled
- Replace single rechtspraak button with Bronnen dropdown in ChatInput
  showing toggles for rechtspraak.nl, wetten.overheid.nl, MvT, and AI kennis
- Wire searchSources through frontend types → mikeApi → route handlers

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
b1507b3b Fix legislation search tool description: clarify it searches law titles Claude 2026-05-04 ↗ GitHub
commit body
The overheidbwb.titel index searches law titles, not article content.
Guide the AI to search by law name (e.g. 'Burgerlijk Wetboek Boek 6')
rather than by topic keywords like 'onrechtmatige daad'.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
adcbdc67 Add fetch_legislation_article tool to read specific BW articles Claude 2026-05-04 ↗ GitHub
commit body
- Add fetchLegislationArticle() that fetches BWB XML via manifest
  or locatie_toestand URL, then extracts article text by number
- Store xml_url (latest version) in LegislationResult from search
- Deduplicate search results keeping the newest version's XML URL
- Add fetch_legislation_article tool to LEGISLATION_TOOLS
- Add tool handler in runLLMStream

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
a8ea2cc9 Remove MvT and internet-toggle sources; simplify search to rechtspraak + wetten Claude 2026-05-05 ↗ GitHub
commit body
The Memorie van Toelichting source is removed from backend tools and frontend
UI. The "Eigen kennis AI" toggle is also removed - the AI always uses its own
training. The sources dropdown button is gone entirely; rechtspraak.nl and
wetten.overheid.nl are now always enabled and hardcoded on submit.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
cec09de7 Restore sources dropdown with only rechtspraak.nl and wetten.overheid.nl Claude 2026-05-05 ↗ GitHub
Both sources are on by default and user-toggleable. MvT and internet toggle
remain removed.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
cfd7ce74 Improve case law and legislation citations Claude 2026-05-05 ↗ GitHub
commit body
- Add r.o. (rechtsoverweging) field to case law citations; system prompt
  instructs model to fill it from fetched judgment text
- Fix formatCitationPage: show "r.o. X" for case law, article ref for
  legislation, pagina N for documents - eliminating "Page undefined"
- System prompt: place citation marker directly after the legal reference
  (after "BW"/"Rv"), not after "geldt dat"
- System prompt: instruct model to use URL from fetch_legislation_article
  (which now includes today's date) rather than constructing its own
- fetchLegislationArticle: include current date in returned URL

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex
89f5a7fc Remove mvt and internet from search_sources type in mikeApi Claude 2026-05-05 ↗ GitHub
Aligns frontend type with the simplified SearchSources that only
supports rechtspraak and wetten.

https://claude.ai/code/session_016JxWnFc3baeDgkzDgxY6ex

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-16.md from inside the repo you want the changes in.

⬇ Download capture-thread-16.md