Researched against the SDS digital edition (sprachatlas.ch), the Dialäktatlas
2025 and the regional grammars/dictionaries (links checked to resolve).
- Regional rules now cite sources (a test refuses one without); the SDS
volume/map is in each reason. New: Wallis (appas, wier, wilt, Häärpfel,
Aache, güet), Innerschweiz (Gumel, Eiker), Ostschweiz (näbis), Glarus
(schüü), Sense (gùgge), Graubünden (eswas), Bern (iig, geisch, geit, Hung).
- Wrong claims removed: het, goht, stoht, nid, nit are attested inside the
canton of Zurich (SDS 3/48, 3/57, 4/167) and d/t in 'Dütsch' is spelling
(DWDS) — all now house style ('dispreferred'), no region named. sai, gäu,
vilmau dropped (no source); güet re-filed as Wallis/Uri (SDS 1/142);
Strassenbahn is Swiss spelling, no longer a 'Germany' form.
- Every area page lists its literature: 24 new sources (DNB/e-helvetica/DOI).
- Our own copy is checked at house-style level; the 'Which is Zurich?'
exercise only quizzes forms the gate refuses outright.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Paste a message you received; Heidi shows which forms point to which dialect
area (or to Germany's German), what Zurich says instead, and what each Zurich
word means. Built from pack data only: rules with an origin, bridge rules, and
the vocabulary with its listed forms. Too little text reads as unclear, never
a confident guess.
Adds five textbook regional markers (Bern: Giel, Meitschi, Miuch; Basel:
Kuchi, Drämmli) and re-attributes 'nid' from Ostschweiz to Bern (the east says
nöd like Zurich). Streaks and the reader move from roadmap to changelog.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Found by being asked which shared packages Heidi actually uses. It uses
ai-kit and threadkit. It was not using limitkit, and the reason is the
one SHARED.md predicts: I did not grep the registry before building.
That was not a style miss. Three endpoints were reachable by anyone
with curl and none had a ceiling:
/api/chat spends from a free-tier AI budget shared with every
other visitor
/api/model/check makes a real outbound call with whatever key it is
handed — the one endpoint here that could be used
to test stolen credentials in bulk
/api/check pure and local, but still a way to occupy the box
limitkit ships the algorithm and the HTTP edges and deliberately NO
limit values, because how many a route allows is app semantics. So the
numbers live in lib/domain/limits.ts with the reason each one is what
it is — a limit with no stated reason is one that gets "temporarily"
raised.
chat 30 / 5 min — generous: a real conversation is a dozen
turns, and someone working through a long WhatsApp
thread must never meet this
model-check 6 / 5 min — nobody legitimately needs more than a few
attempts to paste a key correctly
dialect-check 120 / 1 min — free to run; only about not letting one
client monopolise the box
Verified against a running server: six probes pass, the seventh gets
429 with Retry-After and X-RateLimit-*, and the same address still has
its full dialect-check allowance — budgets are per endpoint, so
spending one cannot lock someone out of another.
Stated plainly in the module: this reads forwarded headers, so it is a
rate limit and not a security boundary. It exists to stop accidental
and casual abuse from spending a budget that belongs to everybody.
pnpm-workspace.yaml gains an allowBuilds entry — limitkit is a git
dependency and pnpm 11 silently installs NOTHING without it, so the
install "succeeds" and the package is simply absent.
145 tests.
Claude-Session: https://claude.ai/code/session_01FzYBD3sZroCAYeRgTYrpfT
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(variety): make the taught language data, not code
Heidi teaches Zurich German to people who already have Standard German.
That is one instance of a general problem: an adult commands a bridge
variety B, is surrounded by a related target variety T, and cannot
understand T. Ukrainian-for-Russian-speakers is the same problem in a
different script. So the engine must not know which variety it serves.
Replaces lib/domain/dialect/purity.ts with lib/variety/:
pack.ts the contract every variety must satisfy
check.ts the deterministic gate, generic over packs
active.ts the seam — one line names the variety this build teaches
packs/ gsw-zh.ts (Heidi) and uk.ts (Lesya)
The second pack is the point; an abstraction with one instance is a
guess. Writing it held the contract and cost two fields:
orthography.standardised — Zurich German has no standard spelling, so
a variant is not an error. Ukrainian has a state orthography, so it
is. Identical checker behaviour would be wrong in one direction.
learner.priority — the field that would have sunk a naive port. A
Russian-speaking Ukrainian has understood Ukrainian since school;
their gap is interference-free production, not comprehension.
Shipping Heidi's listening-first front door there drills a skill that
population already has. The engine now reads priority[0].
Severity replaces the boolean, ranked by how certainly wrong a form is.
unattested outranks foreign deliberately: a Bernese word is real and
the judgement is regional, a ß in Swiss text is not a form of the
language at all. Ranking these the other way let both through the
generation gate — caught by a test.
Also:
- package.json test script hardcoded one file, so any new test was
silently never run in CI. Globbed.
- correspondences were duplicated in landing.ts; the page now reads the
pack, which is the only source.
- landing copy overclaimed the Frisian null result, and /try promised a
comprehension gain from 60s that the literature does not support
(the replicated effect at that timescale is processing speed).
HEIDI.md is the canonical definition, separating fact from hypothesis
from product decision, and records that every Zurich speech corpus
found is research-licensed — which is the real moat, not the state of
Swiss German TTS.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BUfvtBc4ycbYRRjb9eBmuB
* feat(ask): Heidi actually does something
The site served a landing page with a Try button that went to a
placeholder. This makes the tool the page.
One field on /, two modes. Understand: paste what you received, get
what it says, the tone, the words worth keeping, and three replies you
can copy. Say it: write what you mean, get it in Zurich German with
alternatives. The answer comes first and complete — at 08:55 before a
meeting someone needs the message decoded, not a lesson — and what
there is to learn sits underneath without blocking it.
Three deterministic guards sit between the model and the learner, all
for the same reason: this is the one product whose buyer cannot check
the goods, because they are buying the variety they do not know.
1. Every generated line goes through the variety gate before it is
shown. A flagged line is kept and marked, not dropped, so drift
stays visible.
2. A correspondence may only be cited if the pack vouches for it.
Found by running it: asked about "Im Kauz" — a Zurich bar — the
model decided Kauz was a typo for Huus and supplied the sound law
"k → h". Confident, plausible, entirely invented, and aimed at
exactly the person least able to catch it.
3. A word glossed against itself is dropped. The model kept
explaining that freundlich means freundlich.
Also found by running it: "tell them I'm late, but friendly" produced
"Ich bi z'spöt, aber freundlich" — the tone instruction translated as
content. The produce prompt now separates the message from
instructions about the message, with that exact case as the worked
example.
The AI layer is @bitbaum/ai-kit (freeChain + complete), per
fleet/SHARED.md — not a ninth hand-rolled client. A retired model
cannot take Heidi down. With no key the route answers 503 and says so
rather than pretending.
The prompt is built FROM the variety pack, including the list of
forms the gate will reject, so the model is told to avoid exactly what
the checker enforces. No language is named in prose anywhere in
lib/variety/prompt.ts — that is what keeps the Lesya swap real rather
than decorative.
uk.ts is trimmed back to a bare contract fixture. The seam was the
ask; a Ukrainian product was not.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BUfvtBc4ycbYRRjb9eBmuB
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds /check, the first interactive feature: a textarea + Check button
that POSTs to app/api/check (validated, max 2000 chars) which runs the
existing checkZurichPurity and returns { ok, violations }. On a miss,
each offending span is highlighted inline (mark, accent-tint/dialect
tokens) with its reason listed below — purity.ts stays the sole judge,
never a model. Copy lives in lib/config/check.ts.
Links "/check" from the landing header (wraps to its own row under
360px so it doesn't collide with the brand) and adds it to the
sitemap. Uses Response.json rather than NextResponse in the route
handler, and a relative .ts import for purity.ts, so the route can be
exercised directly by node's test runner (importing "next/server" or
the "@/*" path alias both fail outside Next's own build). No new
dependencies — validation is done by hand, not zod, to honor that
constraint.
Widens the test script to a glob (app/**/*.test.ts, lib/**/*.test.ts)
so route.test.ts runs alongside the existing purity suite.
Co-authored-by: Mao Nakamoto <maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>