Commit Graph
64 Commits
Author SHA1 Message Date
CatoandClaude Sonnet 5.5 062da325dd feat(law): ask the law, a chat that answers from the provisions it finds (#290)
* feat(law): ask the law, a chat that answers from the provisions it finds

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

* feat(law): the search API takes law-word stems and several authorities

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-24 07:28:05 +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 56e5ff8215 fix(law): the official-links read tolerates the few acts whose number has no digit (#286)
Schwyz states 430 acts in force; the digit search finds 426. Links are only
added or replaced, so a short list is safe; under 95% is still refused.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 12:51:36 +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 c00943c402 docs: the law as data, and the direction it belongs to (#280)
- docs/design/2026-10-law-as-data.md: every law and regulation in force in
  Switzerland and Liechtenstein as data, with the publisher's text and a hash
  as the source, valid time, no deletes, reusing the Places importer,
  sources and licence policy. Measured on 2026-10-22 from LexFind's own
  statistics: 5,339 federal and 16,389 cantonal texts in force (21,728); the
  Fedlex SPARQL count (13,257) differs and is not yet explained, so neither
  is the target. Liechtenstein and the communes are not counted.
- docs/design/2026-10-direction-notes.md: the reasoning, from the same day's
  brief, with what is built and what is not, and the open questions.
- ROADMAP.md: the law as data first under Now; one list of the kinds of
  group, a place with a common fund and a budget, and contracts with
  success measures under Next. Shipped: Liechtenstein places.
- CHANGELOG.md: Liechtenstein places (#277), the Places load workflow
  (#279) and the roadmap entry.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 22:53:28 +02:00
CatoandClaude 8b716ce8a9 feat(places): add Liechtenstein as a country pack (#277)
Liechtenstein becomes a pack beside Switzerland, so /api/v1/places resolves
Vaduz and the other communes by name and postcode.

- countries/liechtenstein.ts: nation (Fürstentum), the two Landschaften
  Oberland and Unterland as a full level (Constitution Art. 1; the electoral
  districts of Art. 46), the eleven communes; CHF, region LI, postcodes 94[89]x.
  No tax model.
- Identifier schemes li_landschaft and li_municipality (7001-7011, the numbers
  swisstopo's directory of localities gives the communes), both reserved.
- Source li-constitution-communes: a hand-kept batch
  (data/places/liechtenstein/communes.json, fixture adapter) citing the
  Constitution, Art. 1, with names and numbers checked against swisstopo's
  directory.
- Source swisstopo-postcode-localities-li: the Liechtenstein rows of the same
  directory the Swiss postcodes come from; csv_postcodes gains a `where`
  option (as shapefile_areas has) to read only them.
- Tests: the batch passes the check and puts each commune in the Landschaft the
  Constitution names; the postcode source keeps only the 20 Liechtenstein rows;
  an integration test imports both, reruns with no change, and finds Vaduz by
  name and postcode. The Swiss typo test now draws its cases from Swiss places.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 09:46:27 +02:00
CatoandClaude Opus 5.5 22744ace39 docs: correct drift — tokens package, routes, accounts since #269 (#271)
* docs: correct drift in agent docs, README, roadmap and content

- Design tokens: the package is bitbaum/design-tokens, published as
  @bitbaum/design-tokens; Solon installs it as @fleet/design-tokens, Loki
  depends on it, OrangeCat does not (its globals.css mirrors values).
- verify includes check:places-literals; CI's verify job also runs the
  vendored-drift check, the ratification warning and the build.
- Next.js 16.4, five languages, beta wording, five properties.
- README API and page lists now match src/app (places API, members/register,
  cron, member pages, places, compare, faq, blog, roadmap, changelog, ...).
- Accounts after #269: Solon has its own accounts; OrangeCat is one way in
  (ROADMAP, FAQ, whitepaper, plan, uniform-auth superseded note).
- Member pages shipped; .env.example gaps named; ui-guidelines nav notes.

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

* docs(env): list CRON_SECRET and ORANGECAT_URL in .env.example

Both are read by the code (api/cron/places, lib/orangecat-group.ts) and were
missing from the example.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:04:17 +02:00
CatoandClaude 5e78e43398 feat(members): a member's page in a group — seat, mandate, proposals, votes (#262)
/orgs/[slug]/members/[id] was in the plan and returned 404. It now shows the
seat (type, status, joined, weight), a live mandate, the proposals the member
filed (never drafts) and how many votes they cast in closed decisions.

Individual ballots are the member's to show: members.show_ballots, off by
default, switched on the account page by the member alone (the update names
the signed-in actor as well as the seat, so a forged id changes nothing). A
ballot in a session that is still open is never shown. The roster links each
seat to its page.

Face and handle on the page are what the person let Solon see (OrangeCat
orangecat#1319): a withheld picture or handle simply shows as none.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 06:57:36 -07:00
CatoandCursor 68d07037b1 docs(places): record the Schaffhausen top-step gap (#246)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 02:51:54 -07:00
CatoandCursor 9029982639 fix(places): Vaud's 30 % limit on cantonal and communal income tax (#245)
* fix(places): Vaud's 30 % limit on cantonal and communal income tax

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: drop a scratch script; ignore /tmp

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 02:43:52 -07:00
CatoandCursor e41c755cf6 feat(places): Basel-Landschaft, Schwyz, Uri and Obwalden; cantonal and communal tax apart; federal minimum (#244)
* feat(places): Basel-Landschaft, Schwyz, Uri and Obwalden; cantonal and communal tax apart; federal minimum

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 02:08:19 -07:00
CatoandCursor a0c582f7a8 feat(places): rounding as the calculator does; Vaud, Schaffhausen, Nidwalden and Glarus (#243)
* feat(places): rounding as the calculator does; Vaud, Schaffhausen, Nidwalden and Glarus

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 01:06:29 -07:00
CatoandCursor f3db78e5ef feat(places): Ticino and Fribourg, with stated steps and average rates (#242)
* feat(places): Ticino and Fribourg, with stated steps and average rates

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 23:18:53 -07:00
CatoandCursor 1b4a5eec95 feat(places): Aargau, Solothurn, Graubünden and Neuchâtel, which split a couple's income (#241)
* feat(places): Aargau, Solothurn, Graubünden and Neuchâtel, which split a couple's income

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(tax-model): vendor 0.3.0 (componentRefs)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 17:05:11 -07:00
CatoandCursor 62afbef593 feat(places): the map on /places — communes coloured by the tax at your income, with address search and a list (#240)
* feat(places): the map on /places — communes coloured by the tax at your income, with address search and a list

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 16:21:49 -07:00
CatoandCursor 6e00671e92 feat(places): serve the map's data, every drawn commune with its tax figures (#239)
* feat(places): serve the map's data, every drawn commune with its tax figures

GET /api/v1/places/map loads every chain at once and sends shared facts
once; the browser estimates with /compare's estimateColumn.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 15:48:31 -07:00
CatoandCursor 3f432fb31f feat(places): import commune boundaries and publish them for maps (#238)
* feat(places): import commune boundaries and publish them for maps

swisstopo's swissBOUNDARIES3D edition becomes areas with administers
assertions and one content-addressed TopoJSON file, served with a
geo-kit manifest at /api/v1/places/geography.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: changelog PR number

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(deps): declare @types/geojson

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 15:09:50 -07:00
CatoandCursor 4b78904dee feat(places): tax estimates for six more cantons (#236)
* feat(places): tax estimates for six more cantons

Bern, Lucerne, Zug, Basel-Stadt, Appenzell Ausserrhoden and Jura share
Zürich's shape (one basic tariff times canton and commune multipliers, no
splitting) and reproduce the Federal Tax Administration's calculator to the
franc: 108 cases at CHF 60k/100k/250k, single and married, 2025 and 2026.

- MODELLED_CANTONS in sources.ts, shared by the tariff, canton and commune
  multiplier sources
- estv-commune-multipliers: the calculator's export of every commune
  (group 30), read by FSO number for the listed cantons; Zürich keeps its
  canton's own source (the export collapses communes with two rates)
- estv_simple_rates takes either a place per canton or each row's commune
- Biel/Bienne joins the golden fixtures through the real chain
- Ticino left out: its basic tax differs by CHF 25-50

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(changelog): link #236

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 14:20:23 -07:00
CatoandCursor 7506e5b57c feat(places): accent-insensitive place search, Swiss number formats in /compare (#235)
* feat(places): accent-insensitive place search, Swiss number formats in /compare

Search folds case, accents and spelled-out umlauts on both sides from one
character table (translate() in SQL), so "zurich" and "Zuerich" find Zürich
with no extension or migration. A country pack's optional ISO 3166-1 region
sets the number formats for its amounts: CHF 13’050 in German instead of
13.050 CHF.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(changelog): link #235

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 14:02:51 -07:00
CatoandCursor 64fd1dce21 feat(places): /compare, places side by side with the tax estimate in the browser (#234)
Up to four places from the link (?p=…), the estimate computed on the reader's device from the facts each chain holds; the income stays in the tab and never enters a link, form or request. One period for all columns: the latest fiscal year whose figures are all published. A missing figure says why (set by a lower level, or not recorded). Packs name their tax model's inputs, variants and components (taxLabels, checked by the config guard). Place pages link to it; it sits in the Places menu.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 13:29:03 -07:00
CatoandCursor 44e59770f7 fix(places): skip Liechtenstein and commune-free areas in swisstopo's postcode directory (#232)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 12:56:19 -07:00
CatoandCursor efdc8b5713 feat(places): /places search and browse, the Places API, and Places in the header (#231)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 12:48:06 -07:00
CatoandCursor d30bdd0db7 feat(places): daily scheduled import through the box's appcron timer (#230)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 12:44:06 -07:00
CatoandCursor ea1cba0bc8 feat(places): postcodes resolve to the places they lie in (#229)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 12:35:32 -07:00
CatoandCursor de4c161c46 feat(content): whitepaper, questions and answers, and a blog on bip-kit 0.5 (#227)
The deep side gets its long-form pages: /whitepaper, /faq and /blog,
read from content/ with bip-kit 0.5's readEntry, readCollection and Faq,
prerendered as static pages and themed through the shared tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 07:22:49 -07:00
CatoandCursor e5933c0126 feat(ui): everyday pages in plain words, technical details one click away (#226)
Two depths: EVERYDAY_ROUTES speak plain words and keep IDs, addresses, raw
payloads and API links under a closed TechnicalDetails; the deep side stays
as technical as it needs to be. Dashboard uses the standard page header;
record entries read through event-gloss.ts; money reads in bitcoin. A
render check fails the build if an everyday page shows a stored code.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 06:27:05 -07:00
CatoandCursor 15ab13bfe1 fix(ui): decisions pages share one layout and speak plain words (#224)
Proposals, a proposal, and the suggestion form use PageLayout and .field.
Statuses, categories and voting rules go through plain-words.ts and
CATEGORY_LABEL instead of printing stored enum values. Error messages say
what happened and what to do.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 05:45:15 -07:00
CatoandCursor a84935e70d feat(auth): Sign in opens OrangeCat's screen directly (#223)
/sign-in and /sign-up become routes that start the OIDC flow at once;
OrangeCat's screen, titled for Solon, has email and password, a code,
Google, GitHub and Create an account. Solon's own entry page is gone.
Links to the routes are plain anchors so nothing prefetches a sign-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 05:27:16 -07:00
CatoandCursor 6ace991c43 fix(auth): a sign-in error page that leads somewhere (#221)
In Solon's sign-in design and five languages. An email-less account gets
a first button to add the email on OrangeCat; Try again starts the sign-in
directly; the audit-trail link is gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 04:18:25 -07:00
CatoandCursor bf00f1f865 feat(places): /places/coverage, counted from the data (#220)
Per pack: current places per level, how many hold each fact the tax model
reads, and each source's latest retrieval and real run. Places pages count
as translated, so they no longer show the untranslated notice.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 03:38:36 -07:00
CatoandCursor 5877485d2c fix(places): store valid time half-open in the P1 adapters (#219)
Tariffs, multipliers and ended communes ended a day early: the adapters
stored a period's last day where the model expects the first day after.
An estimate on 31 December came out incomplete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 03:29:18 -07:00
Cato 6b6434bca7 feat(places): validate optional boundary geometries (#218) 2026-09-29 20:45:08 -07:00
CatoandCursor 2904ac30d4 feat(places): Zürich tariffs and canton multiplier from ESTV — golden fixtures match the federal calculator (#217)
- POST retrievals: RetrievalRequest.body; the snapshot is an envelope of request
  and response text, since a tariff export does not name its year
- planning may probe the source; ESTV answers unpublished years with other
  years' figures, so the adapter asks the published year range first
- estv_tax_scales (thresholds or widths per table type, variants by group,
  splitting and unread table types skipped with reasons) and estv_simple_rates
- sources estv-income-tax-scales and estv-canton-multipliers (Art. 5 URG)
- golden: Zürich and Küsnacht 2025 at CHF 100,000, single and married, match
  API_calculateSimpleTaxes within its rounding
- docs: §6.2 limits of schema v1, §8.2 sources, §8.3 envelopes and probe, §11

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 23:06:31 +02:00
CatoandCursor 0145407aef feat(places): Zürich commune multipliers — csv_facts adapter, skipped rows in the report (#216)
* feat(places): Zürich commune multipliers — csv_facts adapter, skipped rows in the report

- csv_facts: yearly figures per place from CSV; place, year and figure columns,
  scheme, metric and scale are the source's options
- figures date over the pack's fiscal year, not an assumed January
- adapters may skip a row with a reason; run reports list them under skipped
- zurich-municipal-multipliers (opendata.swiss terms_by): 948 facts for 160
  communes since 2021; communes with two rates are skipped, not guessed
- docs: sources, the production load procedure, P1 progress

Co-authored-by: Cursor <cursoragent@cursor.com>

* style: prettier

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 22:55:19 +02:00
CatoandCursor b7027f1122 feat(places): Swiss structure — FSO commune register and Zürich quarters import through real adapters (#215)
* feat(places): Swiss structure — FSO commune register and Zürich quarters import through real adapters

- adapters parse formats and name no country; which levels and schemes rows
  become is each source's options in config, checked by the adapter's schema
- bfs_communes_snapshot (every canton, district, commune on a date),
  bfs_communes_mutations (mergers as succeeds), geojson_tiers (city quarters)
- places:fetch retrieves what an adapter declares; --backfill loads history once
- importer: relation-only batches, ended places filed under their last parent
- Swiss pack: levels, schemes, metrics, income-tax model (no church tax yet)
- licence policy: opendata.swiss terms and Art. 5 URG official acts
- acceptance: Witikon resolves to Switzerland and takes no tax; reruns change nothing

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(changelog): Swiss structure (#215)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 22:44:16 +02:00
CatoandCursor d5aaa4a2ad feat(kinds): charter_city — vendor @bitbaum/collective-kinds 0.2.0, widen the kind checks (#214)
* feat(kinds): charter_city — vendor @bitbaum/collective-kinds 0.2.0, widen the kind checks

A city with its own charter, founded by agreement with its host state, or
proposed before it. Place-bound like a town; suggested profile: elected
delegates decide. Migration 0011 recreates organizations_kind_check and
organizations_place_bound_kinds_have_a_place from the kind list; both only
widen.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(changelog): charter city

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 20:38:19 +02:00
CatoandCursor ecb064f404 feat(places): CI guards — no country literals in the engine, neutral copy (#213)
- check:places-literals (in verify): a TypeScript-AST scan of src/lib/places,
  the vendored tax model and the place page for registry keys, ISO region
  and subdivision codes, currency codes and month-days. Keys come from the
  registries, codes from Intl; the engine's own vocabulary is exempt. A unit
  test runs it with Testland's keys, so it has teeth before any real pack.
- neutral-copy test over messages/*.json, terms per language in
  src/lib/config/places/neutral-terms.ts (phrases where a word has an
  innocent governance sense); an attributed quote is exempt.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 20:31:34 +02:00
CatoandCursor 828b77c136 feat(places): minimal place page; the P0 acceptance test renders Testland's pages (#212)
/places/[...slug] shows a state place's name and level from its pack in the
reader's language, the official badge, the chain from the root, places at
overlapping levels, whether it levies tax (taxingLevels over the chain's
facts; 'no tax model yet' when the pack has none), other names, identifiers
linked through the scheme's urlTemplate, and the latest retrieval of each
source behind it.

- place-view.ts (pure view model), place-page.ts (loader, config injected)
- PlaceProfile takes its translator as a prop, so the acceptance spec renders
  the real component from database rows with the Testland config
- Places namespace in all five catalogs
- render check: unknown place paths answer 404, not 500
- vitest inlines next-intl so its navigation resolves next/navigation

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 20:15:42 +02:00
CatoandCursor 291939c22c feat(places): importer framework, invariant engine, chain reader; Testland imports and evaluates (P0) (#211)
One run turns a retrieval of a source into rows or a precise refusal:
snapshot under sha256, parse with the adapter's schema, map to generic
shapes keyed by identifiers, check against config (quarantining values
outside a metric's plausible band), then in one transaction sync the
registries, record the source, apply (insert, end, supersede; never
delete) and run the invariant engine over the pack's hierarchy. Every run
is a place_import_runs row; a dry run rolls back with an exact diff.

- src/lib/places/importer/{batch,validate,snapshots,run}.ts
- src/lib/places/invariants.ts, slug.ts, chain.ts
- adapters/ with the fixture adapter
- pnpm run places:import <source-key> <file> [--dry-run]
- Testland register fixture + acceptance spec: import, idempotent
  re-import, supersede on change, hamlet chain, hand-computed tax estimate,
  hamlet takes no tax, invariant failure writes nothing, quarantine, dry
  run, licence refusal
- schema spec's fixture places are now long-ended and use their own
  source key, so parallel specs never share a live hierarchy

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 20:08:53 +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 1e20e2d218 docs(design): Places paths match Solon's layout; name the evaluator package (#208)
Config lives in src/lib/config/places/, not config/places/, so the P0
acceptance test now reads 'changes only to its pack and fixtures' rather
than 'zero changes under src/'. The evaluator is @bitbaum/tax-model,
produced in orangecat/packages/tax-model (bitbaum/orangecat#1190) and
vendored here under a drift check. Its result reports complete and
missing instead of assumptions, and the example model carries its
schemaVersion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 08:47:28 -07:00
Cato 58595a587b docs(design): record George's Places decisions; add advisory votes (#207)
Places (§13) is decided. The Register starts under "One person decides"
with George as its only mandate holder; everyone else proposes and advises,
including by advisory vote. Editorial policies are adopted by Register
decisions. SECO sanctions lists first, UN and EU after legal advice. No
share-alike data source before P4. Places takes Platform's header slot once
it ships; Solon's vision line changes only then.

The constitution engine gains advisory votes: where a mandate decides,
members can still cast non-binding, recountable ballots, and the decision
records whether it followed them. Not built; Phase 3.
2026-09-29 08:22:40 -07:00
Cato 5f67c901e8 docs(design): Places — every jurisdiction on one map, official and founded (#206)
A design proposal, nothing built. Solon mirrors existing jurisdictions
(states, subdivisions, de facto authorities) beside the ones people found,
and lets anyone compare them, take part in them and leave them.

- First principles up front: mechanism in code, structure in config,
  facts in data, editorial policy decided by vote.
- Authorities separated from territory; claims, administration and
  recognition are sourced, dated relations, so disputed and partially
  recognised places need no special-case code.
- Country packs and registries hold every country-specific fact; the Swiss
  tax formula is declarative data evaluated in the browser.
- Build order: foundations proven on a made-up country, then the Canton of
  Zurich, Switzerland, founded places, the world backbone.

The plan of record gains Places in its information architecture and as
build phase G.
2026-09-29 07:48:48 -07:00
CatoandCursor 1681244c7a docs: retire the manifesto and the parked town-OS name (#205)
docs/TOWNSISM.md was a public copy of a thesis that is no longer the
product's framing; the /why page it backed was already removed in #90.
The constitution-engine design doc keeps its federation and exit section
and closes the naming question: Solon stays Solon.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 06:02:51 -07:00
CatoandClaude Opus 5.5 f98f567e91 docs(auth): record option A as decided, and what shipped (#192)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 09:22:33 -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