Files
causius/components
CatoandClaude af0757a737 feat(agent): read Swiss federal law from Fedlex, no search engine needed (#36)
A read_law tool: an act by abbreviation (OR, ZGB, SchKG, DBG, AIG, CO,
CC, LP…, all three official languages) or SR number, and an article.
lib/law/fedlex.ts asks Fedlex's open SPARQL endpoint which consolidated
version applies today, fetches its HTML from the official file store and
cuts out the article (paragraph numbers kept, footnote markers dropped).
The text comes back with its Fedlex link as a numbered source.

Free and on our side of the wire, so the agent can source federal law
while web search is down; an unsourced answer is corrected toward
read_law, and stored unverified only when Fedlex is unreachable too.
live/law.live.ts (pnpm run check:law) reads real articles and checks
that every SR number in the abbreviation map is a real act.


Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 11:08:38 +02:00
..