Commit Graph
77 Commits
Author SHA1 Message Date
Cato 8fb5944fe6 law-text-cloud: survive the box's sshd going away mid-load (#536)
Round 1 of the Parliament texts stored 40 and then lost the tunnel ('Connection terminated unexpectedly'; rsync: port 22 refused). Keepalives were already set, so a longer outage needs a new tunnel:
- ensure_tunnel re-opens the tunnel before every batch, waiting up to ten minutes for the box
- a batch that dies on a lost connection is retried twice (loads are resumable)
- snapshots are copied after every batch, so a late failure loses nothing
2026-11-11 14:21:52 +01:00
CatoandClaude d874861492 feat(snapshots): source snapshots are kept gzipped on disk (#535)
The snapshot store held 17 GB on 2026-11-11, on a disk every site on the
box shares and that had reached 89%. Almost all of it is law text and
register pages: XML, HTML and JSON.

- FileSnapshotStore writes <sha256>.gz and hands back the same bytes; the
  key is unchanged, and a snapshot written before this is still read
- snapshots:compress converts the existing files one at a time: compressed
  aside, read back and checked against the sha256 in its name, renamed, and
  only then is the plain copy removed. A file whose bytes do not match its
  name is left alone and reported
- snapshots-compress.yml runs it on the box at lowest priority; it refuses
  to write unless the live app's release receipt is on code that reads a
  compressed snapshot. Dry run by default
- geometry files are served to browsers as they are and are not touched


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-11 13:32:54 +01:00
CatoandClaude bb6fbffa2c feat(places): one page shape for every place, photographs for every subdivision, served by Solon (#532)
- The page: a hero with where the place sits, its kind, name, status line,
  headline facts and one main action (its constitution, else its law); below,
  the law and what a resident can do beside the place at a glance, which no
  longer repeats the hero. The same shape with or without a photograph.
- The places inside a place are photo tiles, the world index's tile, when most
  have a photograph. The world index opens on the Earth from Apollo 17 and is
  grouped by kind of place.
- Photographs for 9,296 places: places:photos --all reads every ISO 3166-2
  subdivision, Swiss commune, US state and county Wikidata holds; a Swiss
  canton's FSO number reaches its ISO code through a config crosswalk. Iran,
  Tanzania, Appenzell Ausserrhoden and Jura chosen by hand.
- Solon serves the photographs itself (/api/place-photo, place_photo_bytes):
  each Commons thumbnail read once, politely, kept across deploys. About one in
  sixteen tiles came up black when the image optimiser hit Wikimedia's limits.
  The places-data workflow reads the world list's photographs after a deploy.
- /credits pages through the place photographs.
- Fixed: the chat's "Thought for {time}" label threw a formatting error in
  every language.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 21:55:46 +01:00
CatoandClaude 68759b9847 feat(law): a plan for every country's law, and Russia's and Ukraine's constitutions (#529)
- A law authority for every country of the world list: listed ones keep
  their key; any other is its alpha-2 code, or alpha-3 where a canton holds
  the two letters (fra, geo, bel).
- The plan as data (data/law/plan.json, src/lib/law/plan): per country,
  the constitution in force by Constitute's index, candidate copies from
  Wikidata, the source chosen by an unambiguous rule or by a person with a
  reason, the provision of its own law that puts official texts outside
  copyright, the national readers. `pnpm run law:plan seed` re-reads the
  sources and keeps every person's decision; `pnpm run law:plan status`
  counts progress from the database and derives each country's next step.
- One reader for any country's constitution (law:text plan-constitutions):
  a Wikisource page through the REST API or any document copy (PDF/HTML),
  cut into articles for many languages, stored as status `copy` with who
  keeps it and the day read. Refused: no copyright basis recorded, too few
  articles, or a copy naming no year since the last recorded amendment. A
  copy attaches to the constitution a register already lists; a country
  whose constitution is held from its publisher is left alone. Waits as
  long as a 429 asks.
- Russia's Constitution (ru.wikisource, as amended in 2020: 137 articles
  and the five inserted) and Ukraine's (the Constitutional Court's copy,
  with the 2016 and 2019 amendments; uk.wikisource's was refused as older),
  with their routes: Russia Art. 134-136; Ukraine Art. 93, 154-157 and the
  people's referendum (Art. 72, 74). Licences: Russia Civil Code Art.
  1259(6), Ukraine Law No. 2811-IX Art. 8(1)(3).
- The act page says whose copy a text is. Law sync runs Russia's register
  and the plan's constitutions weekly.
- statistics sync test writes the metric it names, instead of relying on
  another file having done so first.
- docs/design/2026-11-law-of-every-country.md; roadmap, changelog.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 20:11:43 +01:00
Cato 6da15e933f law-text-cloud: the South Ossetian text sources can be dispatched from the runner (#519)
parliamentrso-text and presidentruo-text were in the box workflow's list but not this one's.
2026-11-10 13:46:42 +01:00
Cato 39ddbf253f South Ossetia: text reader for the President's decrees (and the Parliament's, held back) (#500)
* South Ossetia: text reader (L1) for the Parliament's acts and the President's decrees

A node page or post cut into preamble, chapters and articles, dated by the
Parliament's own date field or the decree's closing lines, numbered from the
header or closing lines when it prints one (act_number, <year>/<number>).
Commands law:text parliamentrso-text|presidentruo-text, paced by the site's
crawl-delay and a second respectively; verify reads only the act's body on a
Drupal page. Fixtures from the live pages, unit and database tests.

* South Ossetia: text reader (L1): the President's decrees stored, the Parliament's refused until its terms are found

A node page or post cut into preamble, chapters and articles, dated by the
Parliament's date field or a decree's closing lines, numbered <year>/<number>
(act_number) when the act prints one. law:text presidentruo-text and
parliamentrso-text, --act to read chosen ids, paced by the site's crawl-delay
and a second. The Parliament's texts are refused while its config says no
terms admit them. verify reads only the act's body on a Drupal page.
2026-11-10 11:32:50 +01:00
Cato 8e7fc9cada South Ossetia: register of acts (L0) from the Parliament's listings and the President's API (#487)
Authority `rso` (place Wikidata Q23427, topLevel: no ISO code, and `so` is
Solothurn's). Two format readers, config-driven: a Drupal taxonomy listing
(Parliament, honours the 90 s crawl-delay) and the WordPress REST API
(President, 1,849 acts with decrees, documents and treaties under one id).
Fixtures from the live pages, unit tests and a database integration test;
commands `law:text parliamentrso|presidentruo` and the two workflows' lists.
Licence entry for the President's site quoting its reuse page.

Claude-Session: https://claude.ai/code/session_019MDtmuWnz7uS87NvSiDSDs
2026-11-10 10:49:12 +01:00
CatoandClaude e7897672c3 Places load on a GitHub runner (#479)
The box's address is refused by the World Bank (HTTP 403), so no World Bank series has ever loaded
from it; a runner has another address.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 09:32:01 +01:00
CatoandClaude b857d08d56 Liechtenstein: keep the text outside the articles (promulgations, annexes, lists); recut-lilex; verify leaves footnotes out (#474)
The accuracy check showed 29 of 30 sampled acts below 97% of their pages' words. The cutter
ended each article at the next heading and dropped what sat under a heading of its own: one
annex held 3,225 words of a partner-state list that was not stored.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 07:49:47 +01:00
CatoandClaude b34c4339f4 law:text verify: read a sample of held acts again and say how much of each page the stored text holds (#469)
So 'loaded' can be told from 'correct': a cut-short provision or a skipped article shows
as page words held nowhere.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 07:05:43 +01:00
CatoandClaude f378f2c529 box-status: say where the memory is (by process, by swap, kernel account, tmpfs) (#464)
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-09 18:23:53 +01:00
CatoandClaude 0063e2f8f1 Law load on a GitHub runner, through a tunnel to the production database (#463)
The box's memory is spent by other services (swap full), which starved the EU and UK
loads for hours. A runner has its own memory. It writes to the same database through an
SSH tunnel and copies the snapshots it takes back to the box.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-09 17:19:27 +01:00
CatoandClaude 0b3ee0560d box-stop: end one load by name instead of every load (#455)
The box is under memory pressure (swap full), so one wasteful load, such as the UK's
limited batches that relist every held year, can be ended without ending the rest.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-09 11:02:01 +01:00
CatoandClaude Sonnet 5.5 c50c65fffa Statistics: law, practice and outcome as layers, data-integrity plumbing, and the freedom framework (#452)
* feat(statistics): the law beside the numbers — series, law links, timelines, axes, saved views

Implements the roadmap section {#stats} (docs/design/2026-11-freedom-laws-statistics.md):

- Series as facts: a `statistic` block on metrics (definition, publisher,
  series code); World Bank (WDI API) and OECD (SDMX) adapters; five series
  for CH, LI, EE and US, read monthly; a publisher's 5xx is retried twice.
- An append-only `statistic_records` log for law links, events and
  enforcement, written from a curated, source-checked list by
  `statistics:sync` and the daily places cron; three links checked against
  Fedlex and Riigi Teataja.
- /statistics (ranked bars, axes with reader or group weights),
  /statistics/<metric> (line chart, a timeline of linked acts' versions over
  the same years, the law, enforcement, sources), /statistics/view/<sha256>;
  on @bitbaum/chartkit; five languages.
- Saved views under the sha256 of their spec; a proposal that links one
  carries it as evidence (proposal_evidence), attached in the same
  transaction.
- Roadmap and changelog updated; what remains is listed with its reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsX15QgjkDp9MQaQ92

* feat(statistics): law event pages, clickable timelines, maps, scatter, parallel coordinates, reader-built axes

- Events: what changed (wording before/after), how it came about, votes with
  party breakdowns, who initiated/sponsored/recommended/opposed, claims and
  critiques kept apart from what happened, each line with the page it was read
  on; five loaded (Estonia 2023, US TCJA 2017, two Swiss firearms ballots,
  Kennesaw 1982). /statistics/event/<slug>, /statistics/events; timeline marks
  open them; the numbers around an event (line cut at the change, peers apart,
  a before/at/after table).
- Numbers that mean the same everywhere: central-government-only series
  retired for all-levels OECD series; a per-statistic scope sentence; central
  share of tax as a decentralisation proxy; SDMX series told apart by `match`.
- A world map per statistic on geo-kit, /statistics/compare scatter, parallel
  coordinates per axis, a reader-built axis kept in the link, saved axes.
- Fetch: four retries with backoff and a pause between a source's requests.
- Tests, roadmap, changelog and design note updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsX15QgjkDp9MQaQ92

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-09 09:40:57 +01:00
CatoandClaude 9e18c6a272 Law load: box-status and box-stop, to see and end what holds a turn (#449)
Cancelling a run in GitHub leaves the box's process running with its turn, and a load
that hangs holds it indefinitely; neither could be seen or ended from here.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-09 07:47:39 +01:00
CatoandClaude 7d6d5ab067 Bellinzona: the act's address is its PDF; load lanes: at most two at once (#445)
The server read Bellinzona's 88 act addresses as '%PDF-1.7 …': each one is the
document, not a page linking to it. And an install beside three loads ran the
box out of memory, so loads now take one of two turns: paced publishers (UK
and the like) share one, everything else the other.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 21:39:27 +01:00
CatoandClaude 17155e7185 Law load: a lock per class of load, and batches until nothing remains (#444)
One lock for every load let a slow, paced load (UK, five seconds a request) hold
up the rest for hours. Loads that read PDFs, scans or the EU's pages still share
one turn; the small-page loads take a turn per source. A new batches input runs
batch after batch, stopping when nothing remains or a batch makes no progress, so
one dispatch loads a whole jurisdiction.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 21:03:11 +01:00
CatoandClaude 8be6cbe9fa Law load: give a queued run six hours (#443)
Runs wait their turn for the box's lock; two of them (UK batch 1 and the
municipal re-cut) were cancelled at four hours while still waiting.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 20:44:39 +01:00
CatoandClaude Sonnet 5.5 55ddd4d486 Law: the United Kingdom's Public General Acts and Statutory Instruments from legislation.gov.uk (#440)
* Law: the United Kingdom's Public General Acts and Statutory Instruments from legislation.gov.uk

Authority uk (GB), Open Government Licence v3.0, a feed-and-CLML reader with the
EU reader's shape (safe to rerun, --limit, paced, failure reasons, stop after 20
refusals), CLI source ukleg and recut-ukleg, workflow inputs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (UK): the last feed page is the first that is not full; an act with nothing commenced is not out of force; path kinds in the report

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (UK): say what a text-less item looks like, why feed entries were left out, and show the first words of a few cuts in a dry run

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (UK): an item the site holds only as a PDF is not a failure; samples of the cut in a dry run's report

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (UK): subsection numbers in brackets, as the site prints them

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Docs: ROADMAP law-uk (verified live by dry run) and its follow-ups, CHANGELOG entry

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 15:33:03 +01:00
CatoandClaude Sonnet 5.5 290dd04585 Austria's federal law: the authority and a reader for the RIS's consolidated acts (#437)
* Austria's federal law: the authority, and a reader for the RIS's consolidated acts

The authority at (ISO AT, Natural Earth 040), under the European Union as one of its
members, with its aliases and the notice the RIS's CC BY 4.0 terms ask for. A reader
for the consolidated federal acts in force (ris): the register from the OGD-RIS API's
Bundesrecht query (application BrKons), each act once by its Gesetzesnummer with its
Kurztitel and kind, and each act's whole consolidated text from the RIS's page, cut
into its sections, articles and annexes under the RIS's own markers (§ 4, Art. 2 § 4,
Anlage 1), dated by the latest day a section took effect. Safe to stop and rerun, with
a limit, paced, with failure reasons and a stop after 20 refusals in a row; a text is
read again only when the RIS changed the act after it was read.

Tested on real excerpts of the API's documents and of the whole-act page, and on
hand-written approximations where none could be had (marked as such). Not yet
verified against the live API.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* ris: the types the live register holds, and a way to read chosen acts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* ris: count the register's types by first word, and know more of them

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* ris: say in the log what the cut made of each page

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Austria's federal law: roadmap and changelog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 15:01:52 +01:00
CatoandClaude d1b06d5c9f Cut 'Article N – Title' headings into articles; re-cut held municipal PDFs (#439)
A commune's regulation whose headings put a dash between the number and the
title (Neuchâtel) was stored as one block. The cutter accepts the dash, and
recut-municipal cuts the held PDFs again from their snapshots.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 14:59:04 +01:00
CatoandClaude Sonnet 5.5 e7a4348495 Law: Germany's federal acts from Gesetze im Internet (#436)
* Law: Germany's federal acts from Gesetze im Internet (reader, register, tests)

Authority `de`, scheme `gii_abbr`, licence LicenseRef-de-official-work (§ 5 UrhG),
globe feature 276. The reader takes gii-toc.xml as the register and each act's
xml.zip as text, cut into paragraphs, articles and annexes; versions are dated by
the day read and stored only when the text changed. CLI source `gii`, workflow
input `acts`, a weekly law-sync step. Fixtures are hand-written approximations
(the portal could not be reached from the sandbox).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (Germany): drop the portal's trailing "*)" from titles; dry run shows a glance at each cut

The first live dry run (60 of 6,143 acts, no failures) showed titles ending in the
portal's note mark. The report now also names titles with no kind, acts whose
cut text still holds markup, and unknown abbreviations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Law (Germany): kinds from the live titles, the act's own note kept, roadmap and changelog

The live dry run showed Abgabenordnung and Gewerbeordnung read as regulations
(a "-ordnung" is a statute or an ordinance, so it is now `other`), the old
spelling Erlaß unmatched, and the BGB's first norm (a note on its title) cut
under an unstable number: it is `vorspann` now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 14:33:12 +01:00
CatoandClaude Opus 5.5 e06fabb429 Law loads one at a time; EU acts before 2004 cut into articles (#433)
* Law loads one at a time; EU acts before 2004 cut into articles

The first EU production load ran out of memory (exit 137) while New
Hampshire's batch was loading on the same box: law-text runs did not wait
for each other. Both law workflows now take one lock on the box (flock on
/tmp/solon-law-load.lock) before they start, so a second load waits for
the first; the lock goes with the SSH session, so a timed-out run frees it.
GitHub's own concurrency groups would cancel all but one waiting run.

The same load stored most 1995 regulations as one provision: acts published
before EUR-Lex marked anything are plain paragraphs with no class or anchor,
the article numbers each alone in a paragraph. They are now cut on those
paragraphs ("Article 3", "ANNEX II") under the anchors newer acts carry,
with what precedes the first article as the preamble.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* EU law: cut the acts already held again, from their snapshots

The 1995 acts already stored as one provision are not fetched again (they
are held). The recut that re-cuts cantonal acts from the bytes they were
read from now takes any reader (source, reader version, cutter), and
`law:text recut-eurlex` re-cuts the EU acts held with the new cutter,
replacing a version's provisions only when it finds more. The EUR-Lex
reader's version goes to law-text-eurlex-2 so every act read before is
re-cut once; a version read from an Internet Archive copy keeps its
"+archive" mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

* Format the EU recut test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 12:30:40 +01:00
CatoandClaude bfc1385637 European Union law: the layer above its members, and a reader for EUR-Lex (#429)
The European Union is an authority whose law applies in each of its 27
member states (`members` in LAW_AUTHORITIES), the layer above a member's own
law: Estonia's and Luxembourg's place pages, trail, Markdown front matter and
questions include it, the way a canton's include the Confederation. The atlas
draws no shape for it; its law is reached from each member Solon holds.

A reader for the EU's regulations and directives in force (`eurlex`): the
register from Cellar's SPARQL endpoint a year at a time (CELEX number, English
title, entry into force), each act's English text from EUR-Lex HTML, the
latest consolidated version that has begun or else the act as published,
dated by the day the publisher states, cut into preamble, articles and annexes
under EUR-Lex's anchors. Read through the shared polite reader (Internet
Archive fallback), safe to stop and rerun with a limit; a dry run reads and
cuts texts and stores nothing. Reuse under Commission Decision 2011/833/EU,
with its notice on the act page. law-text.yml gains the source and a `year`
input; law-sync.yml reads it weekly.

Neither publisher's host answered the sandbox: the reader is tested against
excerpts in the publishers' shapes, not captures.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 11:11:14 +01:00
CatoandClaude 4e8b2955ec New Hampshire's statutes: a reader for the RSA from the General Court (#424)
Adds the authority us-nh (US-NH, on the globe as states:33, with aliases)
and a reader for the Revised Statutes Annotated as gc.nh.gov publishes
them: the table of titles, each title's chapters as acts ("RSA 39",
publisher_ref gcnh:<chapter>, the merged page as official_url), and each
chapter's merged page cut into sections with heading, text and source
note. Anchors follow the publisher's own section pages (sec_39-3,
sec_5-6-a). Repealed sections stay as the site marks them; a chapter
repealed whole is one provision and is marked out of force.

Paced 11 seconds apart, safe to stop and rerun, and read from the
Internet Archive's dated copy when the site refuses, trying the former
www.gencourt.state.nh.us address when the archive has nothing under the
new one. A firewall's "Web Page Blocked" page now counts as a refusal
for every publisher.

CLI source gcnh, and the law-text workflow's choice. The warrant-article
route (RSA 39:3) waits for a New Hampshire town authority.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 10:01:58 +01:00
CatoandClaude adf0aa6785 Estonia's law: every national act in force, from Riigi Teataja (#406)
- A reader for Riigi Teataja, the State Gazette: the register of
  consolidated texts in force from its public search (the same POST its
  own site sends, 30 per page), and each text from the gazette's own
  structured XML, cut into its sections (§) with subsections and points,
  numbered as published, superscripts kept (§ 20¹), amendment notes left
  out; anchored by the gazette's own ids (para4, para20b1)
- An importer like Legilux's: acts of authority `ee` named by the
  gazette's group id, stable across versions; each version dated by the
  day the publisher says it took effect; reruns skip what is held, a
  newer version closes the old one. National acts now, municipalities'
  regulations once they are places
- Authority `ee`, the licence basis (Autoriõiguse seadus § 5 p 1), and
  `xml` as a text format
- `law:text riigiteataja`, the choice in law-text.yml, and a step in the
  weekly law sync
- Run against the live gazette: 9,958 national acts registered, the first
  15 texts stored (1,163 sections), no failures


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-07 16:04:48 +01:00
CatoandClaude e58ec0db75 Load data without anyone remembering to: Places files after each deploy, the law weekly (#404)
Comparing Swiss places gave no tax: every canton's per-head tax, measured
and committed on 2026-10-30, was never loaded into production, so the
estimate (rightly) refused to treat it as zero. The file reached the
repository; the manual "Places load" that would have carried it to the
site was never run. Loaded by hand on 2026-11-07 (587 facts); this makes
the manual step unnecessary.

- src/lib/config/places/repo-files.ts: every file under data/places and
  the source it is a retrieval of, in import order; a test holds every file
  to exactly one row and every row to a real source
- `pnpm run places:import-files`: imports each file whose sha256 differs
  from its source's last applied retrieval; unchanged files are skipped
- places-data.yml: runs it on the box after every successful deploy of main
- law-sync.yml: weekly (Sunday 02:17 UTC) as well as by hand, so every
  publisher, Wyoming included, is read again without anyone running it


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-07 13:57:06 +01:00
CatoandClaude 67f54102ff Wyoming's law: statutes, Constitution and the citizen initiative (#403)
The first place outside Europe (design: docs/design/2026-11-global-law-
and-exit.md, "Beyond Switzerland").

- A reader for the Legislative Service Office's downloads: 45 PDFs, one
  per title, Title 97 the Constitution, cut into sections (15-1-101 …,
  Article 3, Section 52 …). Across all 45 files: 21,461 sections, no
  heading missed, no duplicate anchor, no empty section. Wrapped
  citations ("W.S.\n15-9-134. …"), wrapped headings and structure lines,
  the UCC's lettered articles (34.1-2.A-101) are handled and tested
- An importer like Legilux's: the register (us-wy, one act per title),
  then the text; reruns skip what is held, `--again` stores a new version
  only when a file's bytes changed. Dated by the day read: the publisher
  states its date only on its rendered page
- Authorities `us` and `us-wy`; countryOf reads ISO 3166-2 (US-WY is US);
  the public-domain basis registered as a licence (Georgia v.
  Public.Resource.Org)
- Official routes can state a share-based bar, further requirements and
  limits; Wyoming's citizen initiative from Const. art. 3 § 52, read from
  the official text
- `law:text wyoleg` and the `wyoleg` choice in law-text.yml; the law sync
  reads Wyoming again
- New Hampshire recorded on the roadmap as blocked: the General Court's
  firewall refuses Solon's readers


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-06 20:12:09 +01:00
CatoandClaude Sonnet 5.5 663afd685e feat(law): read the communes' LexWork collections — Zug and Glarus, 14 communes, 1,164 acts with dated versions (#374)
* feat(law): read scanned commune acts by OCR, and never drop text before a late first article

A commune that publishes a scan (pages as pictures, no text layer) failed as
"no text in the PDF": Vaduz 5, Schaan 4, Eschen 2, Schellenberg 2. The
commune loader now draws each page (unpdf + @napi-rs/canvas) and reads it with
tesseract.js in the act's language, in process: nothing to install on the box,
no model called. The version's source says so: law-text-publisher-1+ocr.

Schellenberg's hall regulation numbers sections "1." and "2." before an
"Art. 3"; the cutter kept Art. 3 and dropped the rest. When the first article
found is not article 1, the text before it is now kept as one provision.

Live on schellenberg.li: both scans read (2 of 2), 6 acts, 106 provisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* fix(law): an act's page address follows the register when the publisher's address changes

An act first listed at a wrong address kept it for ever: the register import
added a page address only for a new act. Schellenberg's 35 acts were first read
without the page's <base href> (fixed in #361) and stayed at /service/files/...,
so the load kept fetching a web page instead of the PDF ("Invalid PDF
structure" x35), and the official page shown to readers was a dead link.

For a known act, a different official_url now supersedes the old one and the
new is current; unchanged is untouched. Reproduced locally with stale
addresses: 35 corrected, 3 acts loaded, 55 provisions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* fix(law): store a PDF's NUL as a space, and find Lilex pages the issue number does not give

Cantonal: a 47-page intercantonal annex (LexFind 24607) failed to insert. Its
PDF holds one NUL where a glyph has no character (a dash between two words),
and Postgres cannot store NUL. cleanPdfText and blockText replace it with a
space, so no reader can hit it.

Lilex: an act's page address came only from its Landesgesetzblatt issue.
- 59 acts had none (Austrian-era decrees, issues like 60/1): the publisher's own
  Gebietssystematik names each page; all 59 resolve (the act's listing, then each
  parent, once per listing).
- The EEA agreement's page is ...001, not ...000; found the same way (the first
  of the rows a treaty is listed under).
- Two acts have no consolidated page at all (a Bekanntmachung of 1941, a 2020
  EEA decision): the gazette entry links a PDF, which is read.
- gesetze.li answers an unknown address with a maintenance notice carrying the
  proof-of-work script; that is now "no page", not a challenge that stops the run.
- refresh reads these the same way, so they stay current.

Live against gesetze.li into a local database: 0.110 (129 provisions), 641.291,
0.110.042.08 (4), 210.109, 210.111, 210.116 all store.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* feat(law): read a scanned cantonal document by OCR

LexFind document 13622 (a 881 KB scan, no text layer) failed as "no text in
the document": the cantonal importer had no OCR fallback. It now uses the
shared provisionsOfPdf (the commune loader's), reading German, French and
Italian together because the file's own language is not known. A scanned
version's source carries law-text-cantonal-2+ocr.

On the real scan: scanned, 2 articles (Geltungsdauer und Kuendigung, Aenderung
der Vereinbarung).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* docs(law): how Swiss communes publish their law — a survey of the 26 cantons

Five research passes, each reporting only what it opened. No canton hosts its
communes' law centrally except Basel-Stadt (3 communes). Two platforms span many
communes: LexWork (name.tlex.ch, about thirty found) and the i-web.ch CMS (about
fifty estimated). Basel-Landschaft's single CMS is behind a Cloudflare challenge,
reported and not worked around. Lists the order to build in and what is not verified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* feat(law): read the communes' LexWork collections — Zug and Glarus, 14 communes, 1,164 acts with their dated versions

Many communes keep their law in a LexWork (Sitrox) collection at
<commune>.tlex.ch. The app's own JSON interface is open (no login; robots.txt
blocks only the search endpoints), so it is read as data: the list of acts,
each act by systematic number, the day each version took effect (versions are
dated by the publisher), and the article tree. Versions older than the
structured text are held as a PDF and read like any PDF.

- config LEXWORK: the 14 instances verified live (11 Zug communes, 3 Glarus), each
  an authority bfs<number>, within its canton; ACT_TEXT_FORMATS gains json.
- text/lexwork.ts (fetch, dates, versions, article tree), text/import-lexwork.ts.
- law:text lexwork [--host]; Law text load workflow source lexwork.
- Survey doc: the interface is confirmed open.

Live into a local database: Zug 50 versions then 0 failures, Glarus Nord 12 versions /
452 provisions, no failures. Integration test: old version ends the day before the
new one, a second run stores nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 18:52:17 +01:00
CatoandClaude 37aeccc42c chore(law): the law sync runs only when the owner starts it, Switzerland and Liechtenstein only (#363)
No schedule: it is started by hand, on request. Legilux is left out of it;
Luxembourg stays as loaded, not extended, while the two countries come first.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 07:23:48 +01:00
CatoandClaude 493f1a98e6 feat(law): read the law again every day — what changed, served to every model (#360)
- law-sync.yml: nightly on the box, registers then every text reader, each step continuing past a failure
- law:text refresh: re-read held cantonal and Lilex documents oldest first; same bytes mark checked, changed bytes become a new version (date_basis retrieved); stops at a bot check
- law:text municipal --publisher all
- loadLawChanges + GET /api/v1/law/changes + MCP/chat tool law_changes
- design doc: Staying current


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 06:34:25 +01:00
CatoandClaude Opus 5.5 6b54ea11de feat(law): Luxembourg from Legilux — 1,134 acts and their consolidated text; Schellenberg (#359)
* feat(law): Luxembourg — 1,134 acts in force and their consolidated text, from Legilux

Legilux, the Grand Duchy's official legal database (Ministry of State,
Central Legislation Service), publishes under CC BY 4.0 through a SPARQL
endpoint that speaks JOLux, the ontology Fedlex uses. The reader asks for
every consolidated version Legilux marks `applicable` (one per act, 1,134 on
2026-11-01), registers the acts as the authority `lux` (identifier `lu_eli`),
and stores each version's French HTML cut into its articles under Legilux's
own anchors (`art_710-5`), dated by the day it applies from.

`pnpm run law:text legilux` (and the Law text load workflow, source
`legilux`); resumable, a page asked again on a dropped connection.

So that a French-only act reads everywhere: reading an act, its contents or a
provision prefers the language asked for and falls back to the one held.
So that Luxembourg is not asked about Swiss federal law: the planner adds the
Confederation when a Swiss place is in the question or none is
(`countryOf`, read from config). Tools, MCP instructions and prompts name
Luxembourg.

Loaded live into a fresh database: the 1,134 acts registered, three texts
read and cut, nothing failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

* feat(law): Schellenberg, and naming a commune's act when its link says only "Dokument herunterladen"

Schellenberg's page labels every document "Dokument herunterladen": an act is
now named by the link's title, else by its file's name ("3-1-abwasserreglement.pdf"
→ "Abwasserreglement"); a bare kind ("Reglement") gives way to the file's
fuller name. Hex entities (&#xFC;) are read, and a page that offers the same
act twice under two file names lists it once. Schellenberg: 35 acts, li7008.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuxKPxNit33QRcXSCC

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 06:15:02 +01:00
CatoandClaude c2faab03ae fix(law): cut cantonal acts into their articles the way the cantons print them, and re-cut what is held (#357)
A sample of 30 in-force acts per authority found many held as one block
("text"): Lucerne 17, Neuchâtel 13, Geneva 10, Schwyz and St. Gallen 6,
Ticino 5 (its tax law, LT 640.100, among them). The cutter missed what the
cantons' PDFs do:
- a paragraph number glued to the text ("Art. 2 1La présente loi");
- a footnote number glued to the article's ("Art. 13" for article 1,
  note 3; "Art. 198328"; "Art. 23)"), read as the shorter number only when
  it is the very next article;
- a numbered title or a sub-letter after the § ("§ 1 1. Gegenstand",
  "§ 4 b) Wirkungsorientierung"), a starred amended article ("Art. 1*");
- "Article premier", "1er", "primo"; "Article"/"Articolo"; any capital (É, À);
- repealed articles printed as one line ("Art. 91-94 …"): the next heading
  may now be up to ten numbers on;
- "Absatz", "alinéa", "capoverso" written out are references, like "Abs.".
On the real texts: Ticino's tax law goes from 1 provision to 300, with
Art. 198 "Dichiarazione d'imposta" and Art. 192 "Termini" where they belong;
Neuchâtel's RELGSU 1 → 26; Schwyz's finance acts 1 → 15, 18 and 65.
One-item decisions ("Ziff. 1") stay whole.

`pnpm run law:text recut [--authority lu]` (and the Law text load workflow,
source `recut`) cuts the held cantonal acts again from their snapshots,
without asking LexFind again; a version's provisions are replaced only when
the new cut finds more, and each version is re-cut once per reader version
(law-text-cantonal-2).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 05:47:45 +01:00
CatoandClaude 60661cfe40 feat(law): the register as tools for any model — an MCP server, and a law chat that can look further and read the web (#356)
- src/lib/law/tools.ts: law_authorities, law_search, law_find_acts,
  law_read_act, law_read_provision, each running the code its /api/v1/law twin
  runs; one definition for every caller.
- POST /api/mcp: a stateless MCP server (Streamable HTTP, JSON responses),
  public and read-only, bounded per address. Any AI app connects to
  https://solon.orangecat.ch/api/mcp.
- The law chat gains a research step between checking the search and writing:
  the model may call the same tools, and web_search / web_read from
  @bitbaum/ai-kit/web when a search backend is configured, for two rounds.
  Provisions read join the sources [L#]; pages read are web sources [W#],
  never cited as law. With no tool-capable model the answer is written from
  the search, as before. Each step shows in the chat's "Thought for" row.
- share-search-backend.yml copies the box's SearXNG settings into Solon's
  env, as Substrata does.
- The integration page lists the law API and the MCP endpoint.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 05:32:37 +01:00
Cato 8e4324fbe3 fix(auth): wire shared mail and password recovery (#302)
* fix(auth): wire shared mail and password recovery

* fix(auth): use released all-method second-factor protection
2026-10-26 05:34:55 +01:00
CatoandClaude f63a4f51ea chore: share the fleet's free-tier model keys with Solon, by hand, as Causius does (#291)
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-24 07:49:11 +02:00
CatoandClaude 80a4860e4d feat(law): municipal collections through one adapter, starting with the City of Zürich (#289)
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-24 07:17:12 +02:00
CatoandClaude Sonnet 5.5 270cedbcd8 feat(law): Zürich's laws from the canton's own collection, dated by the canton (#285)
* feat(law): Zürich's laws from the canton's own collection, dated by the canton

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(changelog): cite the Zürich reader pull request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* ci(law): keep the ssh session to the box alive on long loads

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 11:50:09 +02:00
CatoandClaude Sonnet 5.5 a45cf1a3e9 feat(law): Liechtenstein's text, cantonal text, and every Swiss act's own page (#284)
* feat(law): Liechtenstein's text from Lilex, dated by the day it was read

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* feat(law): every Swiss act points to its own page at the authority that publishes it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* feat(law): cantonal acts read as documents, cut into articles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(law): cantonal text, official links and Liechtenstein's text on the roadmap and in the design

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(changelog): cite the text readers pull request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* fix(law): law:register read the first argument as the value of --file

Without --file the source name was dropped, so every run read LexFind.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* feat(law): provisions say whether their date is the publisher's or the day they were read

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 11:14:40 +02:00
CatoandClaude Sonnet 5.5 c8de3865eb feat(law): Liechtenstein's laws in the register, from the Government's Systematic Register (#283)
* feat(law): Liechtenstein's laws in the register, from the Government's Systematic Register

3,407 acts in force, named by LR number with the Landesgesetzblatt issue.
The importer now applies generic rows, so a register is a function from its
bytes to rows. Titles and numbers only; the text is the next step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(changelog): cite the Liechtenstein register pull request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 11:01:25 +02:00
CatoandClaude Sonnet 5.5 5412aec138 feat(law): federal text from Fedlex, article by article, with its source and hash (#282)
* feat(law): federal text from Fedlex, article by article, with its source and hash

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(changelog): cite the federal text pull request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 10:29:17 +02:00
CatoandClaude Sonnet 5.5 585375dddc feat(law): the register of every Swiss act, with a coverage page and API (#281)
* feat(law): the register of every Swiss act, with a coverage page and API

Lists the 33,441 acts of the Confederation, the 26 cantons and the
intercantonal agreements (22,047 in force) with title and official number,
read from LexFind's list. Refuses a read short of the count the register
states. Titles and numbers only; text comes in L1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

* docs(changelog): cite the law register's pull request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 10:10:05 +02:00
CatoandClaude 9380f19361 ci: a Places load workflow, for the step the daily timer cannot take (#279)
A hand-kept source (adapter fixture, e.g. li-constitution-communes) has
nothing to fetch, so the daily /api/cron/places run skips it and it
reaches production only through places:import. Liechtenstein's postcodes
(fetched on the 3rd) need its communes, so that run fails until someone
imports them by hand. This dispatch-only workflow runs places:import or
places:fetch on the box from a fresh checkout of main, with the box's own
DATABASE_URL, dry run by default.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 19:25:52 +02:00
Catoandcatomean 8b54b11b91 ci: cut scheduled CI minutes (CI audit) (#275)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 20:30:48 +02:00
CatoandCursor d8f79bbe8c feat(places): tables, config registries and places:sync-config (P0) (#210)
The foundations of docs/design/2026-09-places-and-jurisdictions.md §4-§5,
empty. No existing table changes.

- drizzle/0010_places_foundations: jurisdictions, names, identifiers, areas,
  area assertions, relations, facts, instruments, sources, import runs, and
  the place_* registries. Named constraints built from the vocabulary tuples
  (src/lib/places/vocabulary.ts). Triggers refuse reserved identifier
  schemes on founded places, any change of origin, and every DELETE.
- src/lib/config/places: the Zod contract, the registries (empty but the
  licence policy George decided), and cross-registry validation run at load.
  Engine code takes the config as a parameter.
- places:sync-config projects the registries into the database, refuses to
  pull a key out from under data, and records each change. Every import run
  will sync first in its own transaction, so deploy needs no new step. CI
  syncs and checks on the freshly migrated database.
- Testland, a made-up country, lives only in test fixtures and proves the
  contract holds with no engine change.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 19:59:19 +02:00
CatoandCursor 6ab4b8d36b feat(places): vendor @bitbaum/tax-model; one drift check for every vendored package (#209)
P0 of the Places design (docs/design/2026-09-places-and-jurisdictions.md
§6.2, §11). The tax evaluator's SSOT is bitbaum/orangecat
packages/tax-model (bitbaum/orangecat#1190); Solon carries a byte-for-byte
copy in src/lib/tax-model, like collective-kinds.

check-collective-kinds-drift.mjs becomes check-vendored-drift.mjs with a
list of packages, so the next vendored package is one line, not a second
script. The npm script is now check:vendored-drift. Nothing imports the
evaluator yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 19:50:47 +02:00
CatoandClaude 805b0a3db4 ci(kinds): the vendored collective kinds cannot drift from OrangeCat's package (#201)
src/lib/collective-kinds is a byte-for-byte copy of bitbaum/orangecat
packages/collective-kinds until that package ships on its own. A copy that
can drift silently is what SSOT forbids, so CI now fetches the package's
source from OrangeCat's main and fails when any vendored file differs
(scripts/check-collective-kinds-drift.mjs, `pnpm run check:kinds-drift`).

The directory is exempt from this repo's prettier so OrangeCat's formatting
is the formatting; the files are re-copied from main as they are there.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-28 06:47:29 -07:00
CatoandClaude Opus 5.5 0acbac8011 feat(site): use cases, the ideas behind Solon, a new era, platform, and a mega menu (#190)
* feat(site): use cases, the ideas behind Solon, a new era, platform, and a mega menu

Phases B and C of docs/design/2026-09-solon-plan.md, plus George's
2026-09-25 asks (a page per kind of group and one comparing them, network
states, the art and science of governance, how Solon works with OrangeCat
and Loki, a best-in-class menu).

- /for compares companies, villages and towns, associations and co-ops,
  communities and network states side by side; /for/<slug> is one page per
  group (what goes wrong today, how Solon helps, example decisions, the rule
  template, what works today, the detail folded). Network states get the
  verified definition (Srinivasan 2022) and the seven-step path mapped to
  Solon, with a neutral stance and honest statuses.
- /governance/ideas: Solon of Athens, the Landsgemeinde (Glarus as the
  model; Appenzell's 1990 court ruling as the lesson on who counts),
  Condorcet and Arrow, Ostrom, exit and voice, panarchy and Nozick, charter
  cities, the network state — every claim checked against sources, with
  the caveats the sources insist on.
- /governance/new-era: records, money, work, connection, making, energy —
  what changed, what it means, and the limit of each; what technology
  cannot do. SMR status stated as of 2026, not hyped.
- /platform: Solon decides, OrangeCat pays, Loki works; one decision start
  to finish; what works today vs next; "evidence, not authority" folded.
- Mega menu: four panels (use cases, governance, platform, decisions),
  each with summary, every page described in one line, and a featured
  photograph; click to open, Escape/outside/navigation to close; the
  mobile menu and footer render the same map (site-config MENU).
- lib/content/capabilities.ts is the one list of what is available now,
  in development or planned; pages show status from it, never their own.
- Deeper component for progressive disclosure; two new photographs
  (Museum Appenzell painting, public domain; Starlink over Tübingen's town
  hall, CC0), both on /credits.
- New essays are English-first (PENDING_TRANSLATION in the parity test);
  navigation and home stay translated in all five languages.
- CI: a production-shaped smoke runs the standalone server behind a TLS
  proxy header — the combination that 500'd production today while every
  other check was green.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* docs(design): one account across OrangeCat, Loki and Solon — proposal

Surveyed state of auth in all three products and the recommended design
(one identity, created from any product; passwordless email code and
passkeys; no dead ends). Needs George's go-ahead: it changes how every
OrangeCat user signs in.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 05:05:30 -07:00
CatoandClaude Opus 5.5 3704f26fc9 feat(site): rebuild Solon's front door — full-screen photography, sans headlines, plain words (#188)
* feat(site): rebuild Solon's front door — full-screen photography, sans headlines, plain words

A SpaceX-inspired redesign for Solon as governance any group can hire:
full-screen photographic sections with one statement and one action each,
a three-link header, and copy written for the person who runs a group — no
crypto or protocol vocabulary on the front pages.

- Home rebuilt: Earth at night (NASA) → the Landsgemeinde of Glarus → three
  steps → the live counting demo → the governance agent → who it's for →
  why trust it → hire. New /hire (what you get, who it suits, how it starts,
  what it costs: free for pilot groups in beta) and /credits.
- Photographs from Wikimedia Commons (public domain, CC0, CC BY), each
  registered with author, licence and source in lib/content/photos.ts;
  /credits renders that list.
- Headlines move from the shared serif to the sans (.headline /
  .headline-caps), matching OrangeCat and Loki; design:check now forbids
  font-display in Solon and requires a headline style at display sizes.
- Header: three links + sign-in + "Hire Solon" (was six mega-menus that
  wrapped at 1440px). Footer and mobile menu render one SITE_SECTIONS map;
  tests check every link resolves to a page and the header is a subset.
- Inner pages: left-aligned PageLayout; /security and /governance/voting
  rewritten; dashboard aligned to the page edge, no card-in-card.
- Fixes found by looking: phone layout scrolled sideways (grid min-width),
  mobile menu opened to nothing (fixed panel inside a backdrop-filter
  header), serif wordmark.
- CI: render checks (tests/e2e/render.spec.ts) run in the integration job
  against a built app — styled buttons, one-line header, no sideways scroll
  at 390px, menu opens. Mutation-tested: reintroducing two of the bugs fails
  exactly those checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* fix(types): commit the static-image types CI's typecheck needs

next-env.d.ts declares *.webp imports but is gitignored and only exists after
next build/dev, so verify (typecheck before build) could not resolve the
photographs. Proven by typechecking with next-env.d.ts moved away: 0 errors.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:01:44 -07:00
b787ec19c1 fix(deps): restore the four bumps closing dropped; group Dependabot PRs (#185)
#177-#180 (next 16.3.5, react-dom + @types/react-dom 19.3.0, prettier
3.9.8, vitest 5.0.1) were closed as conflicted with "Dependabot will reopen
clean". It won't: closing a Dependabot PR tells it to skip that release.
Apply them here.

The conflicts came from ten separate PRs each rewriting pnpm-lock.yaml, so
group minor+patch npm bumps into one PR. Drop the labels config: the
`dependencies`/`security`/`ci` labels don't exist on the repo and every
PR carried an error about it.

Co-authored-by: Mao Nakamoto <maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 21:05:32 -07:00