4 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 d73ac3c391 refactor(speech): the engine is @bitbaum/speechkit now — and grammar stops presenting a guess as the answer (#125)
* refactor(speech): the engine is @bitbaum/speechkit now — and grammar stops presenting a guess as the answer

Heidi's speech engine — signal measurement, the evidence rule, fluency,
hesitations, dialect markers, grammar mapping, the LanguageTool client — moved
into github:bitbaum/speechkit#v1.0.0 (dist committed, no build step; npm once
bootstrapped). 20 files leave this repo; 82 of their tests moved with them and
run there (90 in the package). Heidi keeps what is Heidi's: which measures it
CLAIMS (capability.ts), the Zurich pack's marker tests, and the product.

The package reads no environment, so the route now passes
LANGUAGETOOL_URL itself.

THE WIRED GUARD, REBUILT. It checked that a measure's FILE was reachable from
app/; once the engine is a package nothing imports its internal files. Each
measure now names its entry function and the test requires something reachable
to import it. Mutation-proven: dropping checkGrammar from the route fails it by
name. The source-link test also now checks the file EXISTS — the old one checked
only that a string looked like a path, which is how /technology linked readers
to a gate.ts that never existed. The links are real links now.

GRAMMAR SHOWED A WRONG CORRECTION. Measured on the live site after #123:
LanguageTool offers "dem Buch" FIRST and "das Buch" second for "Er hat den Buch
gelesen", and the page showed only the first — a wrong fix presented as the
answer. All alternatives now, and a line saying which one fits depends on what
the speaker meant (seven languages).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(investors): count the tests that moved, instead of overstating them

The data room claimed 111 test files; the speech engine's 11 moved into
@bitbaum/speechkit, leaving 103 here. The ratchet caught it. The figure is
now 842 across 103, plus its own row for the open-source engine (94 tests,
checkable at github.com/bitbaum/speechkit) — moved, not dropped.

Also: ADVERTISED_TEST_FILES was declared below METRICS, so the string could
not reference it and carried its own literal 111 — 'said once' was false. It
is declared above and used now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 02:53:58 -07:00
CatoandClaude Opus 5.5 87f7e8bad9 feat(speaking): grammar and word-search feedback, and a claim may not outrun the product (#123)
* feat(speech): self-hosted grammar checker, and the client that says 'not checked' instead of 'clean'

LanguageTool 6.8 on the box, loopback-only and memory-capped
(scripts/box/provision-languagetool.sh). checkGrammar() returns null when
the checker is down — never [], which would tell a learner their German was
clean on the day the checker was off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(speaking): grammar wired, hesitations located, and a claim may not outrun the product

GRAMMAR. The Swiss Standard German take is now checked by LanguageTool on
our own box, gated on mayJudgeForm (WER within the line), filtered to what a
listener would notice. null = not checked, never [].

WHERE YOU HESITATED. ai-kit 1.16.0 word timings name the word that came
after each long gap — usually the one being reached for. Deliberately NOT a
second fluency computation: #83 measures rate and pauses on the device from
the signal (the better clock), and two answers from two sources would
disagree on one screen. The server adds only what the device cannot know.

THE GUARD. capability.ts computed what was POSSIBLE and never asked what was
WIRED, so /technology claimed grammar while nothing called it. The new test
walks the import graph from app/ and requires every offered measure's module
to be reachable. It found a second bug on its first run: the "words" row
pointed readers at lib/variety/gate.ts, which never existed (now check.ts).
Proven by mutation: detaching grammar from the route fails it by name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(speaking): grammar and hesitations on screen, and the upload the privacy page never listed

ON SCREEN. A Standard German take now shows what was said and what to say
instead ("den Buch → das Buch"), at most three, with "the first 3 of 5" when
there were more, and where the long pauses fell ("1.8 s before «Termin»").
Not-checked renders as a sentence, never as an empty space that reads as "no
mistakes". The checker's German explanations are deliberately not shown — they
would leak German prose into six other locales; the pair needs no translation.
The limit is printed beside the result: it catches agreement, case and verb
forms, not verb position after «weil» (measured on the box).

PRIVACY. /api/speaking/transcribe has uploaded Standard German takes to Groq
since the transcription mode shipped, and the privacy page had no row for it —
its code comment still said there was "no upload endpoint for takes". The
claim lived in a comment rather than a test, so nothing noticed it go false.
New flow `speakingTranscription` in all seven languages: only when you choose
Standard German, audio not kept by us, grammar checked on our own server.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(speaking): name hesitations from the signal's pauses, because Whisper swallows them

Tested on real audio before shipping: Commons recordings stitched as "Er hat
den [1.8 s] Buch gelesen", sent to Groq whisper-large-v3-turbo with word
timings. Text right, grammar error preserved — and NO gap between any words:
"Buch" came back as 1.84–4.14 s, stretched across the whole pause. Detecting
hesitations from word gaps would never have fired on real speech; the unit
tests passed only because their timings were idealised.

So measure() now records where each pause was (pauseSpans), the route returns
the word timings, and the page joins them: a pause belongs to the word still
being spoken when sound resumed. Same answer whether the recogniser leaves a
gap or swallows it — both shapes pinned, the second with Groq's exact output.

pauseSpans is a timeline of where someone went silent: needed on screen,
stripped on WRITE by withTake (it would otherwise have been persisted and only
dropped on read), with a test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(speaking): one file for what a pause means, after two thresholds contradicted each other on screen

A real take read: 'Längste Pause 1.8 s', then 'Keine langen Pausen', then the
new panel pointing at that 1.8 s. Each right by its own number. The three
lengths are different things — counts as a pause (250), searching for a word
(750), stuck (3000) — so they now live side by side in speech/pause.ts, and
the panel says 'Wo Sie nach einem Wort gesucht haben' rather than 'gezögert',
which sits honestly under 'you did not get stuck'. PauseSpan moved there too.

Verified by recording real Commons audio through the real UI via Chrome's fake
microphone at 390px and 1280px.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:54:56 -07:00
CatoandClaude Opus 5 41b78827aa feat(speaking): fix the measurement, wire the half that was never called (#83)
The speaking tool measured a signal wrongly, buried itself under two empty
social sections, and left an entire tested analysis engine with no caller.

MEASUREMENT. A cough, breath or lip smack inside a long silence is a run of
sound too short to be speech. The segmentation discarded it as a run while
still letting it END the gap before it and START the gap after, so ONE silence
of 1.9 s came back as two of 0.9 s: the count inflated, the longest pause
understated, and `pauseCount` free to exceed `runCount` — impossible for gaps
that by definition sit between runs. Observed on the live site: 16 s of speech
reported with 14 pauses and a mean run of 1.5 s, about eleven runs with
fourteen gaps between them. Blips are now dropped before segmenting rather
than during, and `pauseCount === runCount - 1` is a test rather than a
property of a loop.

The screen also never printed the recording's LENGTH. "You spoke for 16
seconds" is a complete short answer or a microphone that stopped hearing, and
without the denominator the learner cannot tell which. It is now the first
figure, and a note reads the share back.

THE HALF THAT WAS NEVER CALLED. `speech/fluency.ts`, `syllables.ts` and
`grammar.ts` were written, documented and unit-tested; a grep for their
importers found `capability.ts` naming their paths in strings and nothing else
in the app. Meanwhile `packs/gsw-zh.ts` has declared
`bridgeRecognition: { available: true, returnsSpokenVariety: true, wer: 6.4 }`
since it was written, `evidence.ts` reads that as `words`, and `capability.ts`
had been computing a verdict of `bridge` the whole time. Nothing asked.

So the practice screen now asks which variety a take is in, and the pack
decides what may be said about it. Züritüütsch is unchanged and still the
default: measured on the device, audio never sent, the learner types the
sentence (§7). Swiss Standard German — the variety Zurich actually speaks at a
Verwaltung counter — is transcribed, and then speech rate, articulation rate,
filled pauses and the gate all have something to work on. `dialect-marker.ts`
checks the vendor's answer on every take, so "you used dialect words while
practising Standard German" is a finding rather than a silence.

Nothing in that branch names a language. `domain/speaking/varieties.ts` asks
the pack; a pack whose target recogniser becomes faithful gains all of it by
editing one object, and a pack with neither renders no switch.

The ban is untouched. No pronunciation score, in either mode, at any word error
rate — `capability.ts` keeps it `refused` rather than `none` so a future reader
cannot mistake it for "not yet". The rate is reported as a PAIR, because the
pair separates word-hunting from slowness and a single number separates
nothing; where the two do not separate, the screen says nothing.

PRIVACY. One mode now uploads, two lines under a sentence saying nothing ever
leaves the device. `useRecorder` hands the blob back only under `retainAudio`,
default false, fixed before the microphone opens — there is no path from
"recorded without it" to "uploaded anyway". The privacy line reads the mode.
`wired.test.ts` asserts the default, the gate and the ternary, because all
three are one careless edit from making the sentence false and none of them
would fail a unit test.

HIERARCHY. Practice first. The page led with an empty rounds list, a nine-field
hosting form, a second empty list and a second form, and put the one thing that
works alone, signed out, on a phone, today four scrolls below them. The lead
sentence changed with it. Also: the record button was `min-h-20 min-w-20 px-6`,
so padding won and the one control on the page was a lozenge; `<summary>` drew
the browser's own black ▼; a take in the history was labelled "nothing recorded
yet" beside its own duration; notes restated figures printed directly above
them; and the bridge was labelled "Swiss Standard German" in German, Russian
and Romansh — a description posing as a name, which is the leak
`display.test.ts` exists to stop, arriving through a field that looks safe.

HEIDI.md §5, §8, §9 and §10 corrected: the "stated limit" paragraph claimed
this was not built because no pack could test it, and its own pack could.


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 06:51:24 -07:00
CatoandClaude Opus 5 5f525eff9e feat(speech): evaluation that measures what it can and refuses what it cannot (#78)
* feat(speech): the rule that decides what a transcript may be evidence of

`lib/voice/correction.ts` arrived at the Swiss German case first and stated it
exactly: dialect recognition transcribes INTO Standard German, so a learner who
says a flawless Zurich sentence gets back `ist` and `nicht` and possibly a `ß`,
none of which they said. Judging their grammar from that bills the recogniser's
output to the learner.

What this adds is that the rule is not about Swiss German. It is about a
property that differs per variety:

  A transcript is evidence about the speaker's WORDS only when the recogniser
  returns the variety that was SPOKEN.

Stating it that way is what makes the surface safe to switch ON where the
property holds. Standard German recognition returns Standard German; the
transcript is then the learner's own words and grammar, vocabulary and speech
rate become measurable rather than invented. `evidenceFrom` answers `none`,
`meaning-only` or `words`, and a test asserts that a dialect recogniser at 0%
WER still answers `meaning-only` — accuracy was never the objection.

Three measures that need a transcript, and could not exist before it:

  syllables.ts  counts vowel groups. It was written with a digraph table —
                au, ei, ie, äu — and the tests showed every entry was a no-op,
                because German writes its diphthongs as adjacent vowels and the
                group scan had already merged them. The list was machinery that
                looked like knowledge, and it is gone. Its two real errors,
                `Familie` and `Bayern`, are pinned AS TESTS so nobody reads the
                measure as exact.
  fluency.ts    speech rate, articulation rate, mean length of run, silent and
                filled pauses. The two rates together say what neither says
                alone: equal articulation with unequal speech rate is somebody
                who has the words and is hunting for them.
  pause.ts      one definition of a pause, imported by both halves. Two
                thresholds would have the signal half and the transcript half
                report different pause counts for one recording, with nothing
                failing.

NO NORMS, and there will not be any. No table of what a B1 speaker's syllables
per second should be: applying one to an adult talking about a topic they chose,
on a phone, in a language nobody normed for this, is the false precision §8
forbids wearing scholarship. Every number is reported as itself and compared
only against the same learner's own earlier takes — which is also what makes the
syllable rule's consistent bias harmless.

Nothing here names a language and nothing here calls a vendor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(speech): grammar findings, and the filter that keeps them the speaker's

LanguageTool rather than a model, for three reasons and the third decides it:
it runs on our own box (LGPL-2.1, a Java REST server, no vendor, no per-call
cost, nothing leaving the machine); it costs nothing per call, so grammar is
not rationed the way a model answer is; and it is the same KIND of thing as the
variety gate — a rule with an id, the same input giving the same output, and a
finding somebody can argue with. §6 exists because a model must not be the sole
judge of language the learner cannot audit, and that argument does not stop
being true for grammar.

THE FILTER IS THE FEATURE, not tidying.

The text came from a recogniser, so parts of it were never the speaker's.
Punctuation, capitalisation and spelling are the MACHINE's decisions — nobody
pronounces a comma and there is no way to hear a capital letter. A checker run
over the transcript flags all three happily, and every one of those findings
bills the recogniser's choices to the learner: the exact failure
`voice/correction.ts` names for dialect forms, arriving by a different road.

So TYPOS, CASING, PUNCTUATION and TYPOGRAPHY are dropped, and a test asserts
none of them can ever appear. STYLE and REDUNDANCY are dropped too — they are
opinions rather than errors, and redundancy is doubly wrong for speech, where
repetition is how people buy thinking time. What remains is what a listener
would actually notice: agreement, case, verb placement, confused words.

A second list excludes by rule id the rules that are right about writing and
wrong about speech, starting with the one that wants a capital at the start of
a sentence nobody capitalised. It is deliberately three entries long and is
meant to grow from watching real transcripts — a long list written up front is
guesses wearing the authority of a constant, and the fleet's own rule is that a
capability is observed, not declared.

Three findings maximum, in reading order. Somebody who has just recorded
themselves speaking a language they are bad at needs the few that matter and
the willingness to press record again tomorrow, not a marked-up essay.

Pure: the HTTP call belongs in a route; this file maps and filters. Proved by
mutation — admitting TYPOS to the allowlist fails the two tests that exist to
stop exactly that.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(pitch): task repetition, and a unit-economics model that admits what it is

TWO THINGS, and they are the same argument in different currencies: say what
is measured, label what is assumed, and never let the second wear the clothes
of the first.

TASK REPETITION (lib/speech/repetition.ts)

Nation's 4/3/2: tell the same thing three times, to a fresh listener each
time, in four minutes, then three, then two. Speaking rate rises across the
deliveries and hesitations fall — consistently, and replicated.

It is the right exercise for THIS product rather than merely a good one,
because the outcome the research measures IS `fluency.ts`. Speech rate and
hesitation count are not a proxy we invented for something we cannot see; they
are the published dependent variables, and we compute them from the learner's
own recording. There are very few closed loops like that in language learning.

What the evidence supports is kept apart from what it does not, per §3: the
rise WITHIN a session is the FACT and is what a learner will see here; that it
transfers to a task they have never told is the HYPOTHESIS, and it is the one
that would matter most. So the copy can say "you got faster at saying this"
and must never say "you got more fluent" — the first is measured, the second
is a claim about a person.

The clock is a parameter, with Nation's original and a phone-sized ladder both
named, because "we used 4/3/2" and "we used a scaled version of it" are
different sentences and only one is true here. And the ingredient a phone
cannot reproduce is stated rather than quietly dropped: the third is a NEW
LISTENER, which a speaking round has and a solo take does not.

UNIT ECONOMICS (lib/config/economics.ts)

`investors.ts` holds things true today that a reader can check. This is the
opposite kind of number — nothing here has happened — so it is a separate file
that says so, and every input carries where it came from.

CAC is not estimated. We have never spent a franc, so any figure would be
invented; what is computable is the CEILING it must come in under, which is a
testable target rather than a hopeful one. At the modelled inputs: CHF 10.20
contribution a month, CHF 127.50 LTV, CHF 42.50 CAC ceiling, payback just over
four months.

The headline is published beside its range rather than alone, because the
business turns on churn — LTV moves from 85 to 204 across plausible values —
and one figure invites belief where three invite the question worth having.
The sensitivity table and the headline call the same function; two
implementations of one formula is how a deck contradicts its own appendix.
`NOT_MODELLED` names the holes, which is where a model's credibility actually
lives.

The market is anchored on a published count and its sharpest fact is
composition, not size: the largest single foreign nationality in Zurich is
German — people who arrive with the bridge variety fluent, cannot follow the
lunch table, and are precisely who a German-teaching app cannot help.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(mobile): the chat void, 125 off-scale type sizes, and a voice that was never German

THE VOICE, reported by a listener: "it sounds like an English person speaks.
definitely not Swiss German."

`variety.ts` was right and the code ignored it. `pickVoice` returns null when
the device has no German voice, and `use-speech` then assigned that null and
spoke anyway — which makes every engine substitute the SYSTEM DEFAULT. On a
device configured in English that is an English voice reading Zurich German.
The comment two lines above the bug described the bug exactly.

It refuses now, with `no-voice` as a real state the control can show. Refusing
outright would have overridden a judgement that is the learner's to make —
"better than nothing" is a reasonable thing to decide about getting the WORDS —
so `speakWithoutGermanVoice` is an informed opt-in, off by default. The product
may not make that trade silently; that is what it was doing.

MOBILE, audited rather than eyeballed: every page, at 390px and 1280px, asked
for sideways overflow, elements past the viewport, tap targets under 44px and
text under 12px. Good news first — nothing scrolls sideways anywhere.

  THE CHAT VOID. /chat was a desktop layout stretched: roughly six hundred
  pixels of white between the greeting and the text box, which reads as a page
  that has not finished loading and asks the least confident visitor to do the
  hardest thing in the product first. The home page already had tappable
  example prompts and the full-screen chat did not, so `Examples` moved into
  its own module and both surfaces render the same one. Copying it would have
  let the first thing a new visitor sees drift into two versions.

  125 OFF-SCALE TYPE SIZES in 43 files — `text-[11px]`, `text-[10px]`, and a
  `text-[9px]` nobody could read. Every one was a reasonable local decision and
  together they were a type scale nobody owned. Swept onto `--text-caption` at
  12px, the floor that survives a phone at arm's length on a tram.

  A RATCHET, because the sweep alone buys a clean tree and the same problem in
  six weeks: `tokens.design.test.ts` fails the build on any arbitrary font size
  or hex colour in a className. It found the 9px and two 13px the sweep missed
  on its first run.

  The composer clears the home indicator via `env(safe-area-inset-bottom)`.

SECTORS, as data with its own honesty test. Care homes, hospitals, schools,
language schools, relocation and employers — the places where this is somebody
else's operating risk rather than their own problem, and where the person who
suffers it cannot buy the fix.

Every row is a MOMENT rather than a benefit, because a reader who has stood in
the room recognises the room and nobody recognises "improved communication".
Every row also carries `unknown`: the thing we would have to learn from them.
That is not modesty, it is what turns a page into a meeting — and a product
with no customers writing as though it has them is the most expensive mistake
available to it. A test asserts the copy never says customers, case study,
trusted by or proven, in either language.

The schools case rests on a fact worth having: Zurich voters made dialect the
kindergarten language of instruction in 2011, so expat parents are locked out
of their child's first school years by law. Cited to the canton.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(speech): the pack owns the language, and a vendor claim stays a claim

CONFIG-DRIVEN, which it was not.

`lib/speech/` measures syllables, counts hesitations and asks a grammar service
for findings, and §4's house rule is that nothing outside `lib/variety/packs/`
may name a language fact. Three were doing exactly that:

  - the German syllable rule existed only inside a test
  - the filler words existed only inside a test
  - `SPEECH_LANG = "de-CH"` was a constant in the voice module, so a Lesya
    build would have gone on asking the synthesiser for Swiss German

They are a `SpeechProfile` on the pack now — synthesiser tag, vowels, fillers,
grammar code — and the engine reads it. Swapping the pack swaps the behaviour,
which is the property the whole variety layer exists for.

`capabilities.asr: boolean` became `recognition: Recognition`, because the
boolean could not express the fact the entire speaking surface turns on: a
recogniser may exist, work well, and still answer in a DIFFERENT variety from
the one spoken. With one flag, "no ASR" and "ASR that translates the dialect
away" were indistinguishable, and the safe reading was to call it unavailable —
wrong in the other direction, since Heidi can understand dialect speech
perfectly well. She simply cannot write it down faithfully.

The bridge is declared separately and is why a speaking surface can exist at
all today: Standard German recognition returns Standard German, so a learner
practising the German they need at a doctor's desk CAN be told about their own
words. Zurich is diglossic and §9 already makes producing that half a product
output.

THE SECOND PACK EARNED ITS KEEP AGAIN. `дякую` is дя-ку-ю, and the syllable
rule said two: German writes diphthongs as adjacent vowels so merging them is
right, and Ukrainian has no diphthongs so merging is wrong by a third. That is
now `adjacentVowelsMerge`, declared per pack — a property of a writing system,
not a thing to infer per word. Nothing would have failed; the rate would just
have been wrong in a language nobody here reads.

A contract test runs the profile over EVERY pack, and asserts the two disagree:
same engine, different answers.

THE VENDOR CLAIM, recorded as a claim.

Swiss specialist vendors now sell dialect STT and TTS together, hosted here,
and at least one advertises transcription that keeps DIALECT TEXT rather than
translating into Standard German. If that holds it is not an improvement in
degree — it is precisely what `evidence.ts` says would make a transcript
evidence about a speaker's own forms.

It has not changed the pack, and a test stops it changing the pack. The figure
advertised is "97.4% dialect accuracy" with no test set named and no
independent evaluation, against a published honest baseline of 25.6% WER for
the entire field: a tenfold claim, unaudited, on a sales page. §7 already
records that most "Swiss German" speech technology is Standard German in a
Swiss accent, and §2 explains why a vendor's own label is the one thing that
cannot settle it — the learner is buying the variety because they cannot tell.

So `SpeechSystem` gained `verified`, claimed nowhere, enforced by a test. The
experiment that would settle it is cheap and nobody has run it: take the free
trial credits, feed it real Zurich speech, compare against a transcript a
Zurich speaker wrote. Then flip the vendor row, then the pack, then the test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(speech): the experiment that settles the dialect claim, minus the key

"Do it for me" — so here is the instrument, and an honest account of the half
of it I cannot run.

THE CLAIM SPLITS IN TWO, and only one half is decidable by machine:

  "returns dialect text"  DECIDABLE. Feed it dialect speech and read which
                          variety came back. No ground truth needed, because
                          the question is about the VARIETY of the output and
                          not its correctness.
  "97.4% accuracy"        NOT DECIDABLE HERE, and nothing pretends otherwise.
                          A word error rate needs a transcript a Zurich
                          speaker wrote. Nobody here has one, and a WER
                          measured against a guess is a number with nothing
                          underneath it.

The first is the one that decides the product anyway: `evidence.ts` turns
exactly one boolean into the whole speaking surface. Accuracy decides how far
to trust the findings; variety decides whether there may be findings at all.

`dialect-marker.ts` settles it from the text. Not the §6 gate, which hunts
forms from the wrong DIALECT and would wave a Standard German transcript
through clean — but the commonest function words, isch/ist, nöd/nicht,
gaat/geht, which appear in almost any sentence either variety produces and
therefore make ten seconds of audio enough. They live in the pack, so the
instrument knows no language of its own; a test inverts them and watches the
same sentence read the other way round.

`unclear` is a real verdict. A clip with no markers gets `null` rather than
`false`, because "we could not tell" and "it translated" are different answers
and only one of them is about the vendor.

Checked against sentences written for the PRODUCT rather than for the test —
the pack's showcase line and the real chat prompts — since an instrument that
could not see those as dialect would not have seen a transcript either.

WHAT I COULD NOT DO, plainly:

  - I cannot listen. §7's test is "listen before believing a label" and I have
    no audio perception at all. Judging whether the VOICE is really dialect is
    thirty seconds for a person and impossible for me.
  - I could not complete a signup needing email verification, and did not put
    payment details anywhere.
  - The vendor's sandbox is synthetic, so it cannot answer a question about
    real dialect. The runner refuses an `sv_test_` key rather than producing a
    confident worthless result.

So `scripts/verify-dialect-asr.mjs` takes a live key and a real Zurich clip and
prints the verdict, naming the three files an affirmative answer would
authorise editing — pack, register row, and the test that currently forbids
both. The claim stays a claim until somebody runs it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(organisations): the page for people whose problem this is on somebody else's behalf

Care homes, hospitals, schools, language schools, relocation firms and
employers with international teams — the settings where dialect is an
operating risk, a training budget or a legal duty rather than one person's
difficulty, and where the person who suffers it cannot buy the fix. A care
assistant does not procure software; a Heimleitung does.

The page does the one honest thing available to a product with no customers,
which is also what actually opens a conversation with an institution: describe
the MOMENT the problem happens, in enough detail that a reader who has stood in
the room recognises the room, and then ask whether we have it right. `unknown`
on every row is the question that turns a page into a meeting, and the "no
customers" paragraph is FIRST rather than buried — a reader who discovers that
on the way down has been managed; one told at the top is being levelled with,
and everything below reads differently.

The schools case rests on a fact worth having: Zurich voters made dialect the
kindergarten language of instruction in 2011, so expat parents are locked out
of their child's first school years by law. Cited to the canton.

TWO RESPONSIVE BUGS, one mine and one not.

MINE: added under `project`, it made an eleventh nav item and the French header
overflowed at 1024px — every page scrolled sideways. That is the exact
headroom `routes.ts` predicted would go. It has no `group` now, so it stays out
of the learner nav and sits in the footer row beside privacy and the Impressum,
which is where an institution already looks. My own comment had made that
argument and I put it in the nav anyway.

NOT MINE: with my item removed the French header STILL overflowed, on pages I
never touched — the `use` group grew to five items across #71–#73 and spent the
rest of the margin. `min-w-0` on the row and `flex-wrap` on the nav: without
`min-w-0` a flex child refuses to shrink below its content and pushes the row
wider instead. It wraps to two lines at 1024 and stays one line at 1280.

And the reason neither was caught: my audit ran 390 and 1280, and this breaks
between them. It now runs 1024 in French — the longest labels, at the width
where the flat nav has appeared and has least room — and it has moved out of a
scratch directory into `scripts/responsive-audit.mjs`, having found real bugs
twice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(mobile): footer links a thumb can hit, and an audit that stops crying wolf

TAP TARGETS. The footer's page list and language list were 16px-tall text
links in a column — a finger is 44px, and this is the one part of the site
somebody reaches for one-handed on a tram. The same file already had the right
pattern two blocks further down, on the privacy and Impressum row; the lists
just never used it.

THE AUDIT'S OWN FALSE POSITIVE, which matters more than the finding.

It reported GUTTER on every page in the site, because it read `main`'s own
padding while the padding lives on a wrapper inside it. A check that fires
everywhere is a check nobody reads — and this one nearly sent me looking for a
layout bug that did not exist, on a site whose gutters were fine all along.

It measures the first piece of real TEXT now: what a reader actually sees
touching the edge, rather than a box that happens to be full-bleed by design.

And the tool no longer lies about its own dependency. It said "Playwright is
deliberately not a dependency" in a comment and then imported `playwright` as
though it were installed, so it died on its first run for anybody but the
author. It imports at run time and prints how to point it at a browser.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(mobile): the language switcher, and the fourth thing the audit was wrong about

The footer's language links were still 16px tall. The previous commit fixed the
page list beside them and missed this one, which is the ordinary way a
"sweep" leaves half a job: the two lists look identical on screen and are two
separate blocks in the file.

STRUCTURALLY THE SITE IS NOW CLEAN: across seventeen routes at 390, 1024 and
1280, zero overflow, zero elements past the viewport, zero gutter failures.
That is the real result of the nav fix, and it is worth stating because the
report that produced it was until recently mostly noise.

Which is the other half of this commit. The audit reported the SKIP LINK as a
failed tap target on every page — it is a 1×1 until focused, which is the
entire point of it. Reporting an accessibility feature as an accessibility
failure is the fourth false-positive class removed from this tool:

  gutter on `main`        fired on every page in the site
  tap targets at 1280     a mouse pointer is not a finger
  links inside prose      cannot be 44px without wrecking the line
  the skip link           invisible by design

Each removal made the report smaller and more trustworthy, and the third and
fourth would each have had me change working code. A check that cries wolf is
worse than no check, because it trains the person reading it to skip the line
where it is finally right.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(settings): what this device is holding, and the button that ends it

The data section said, in a paragraph, that saved words and the signed-out
conversation live in this browser — and then linked away. It is the one claim
in the privacy section that the architecture lets us simply SHOW: every device
store is four localStorage reads, so "what do you have on me, and delete it" is
a list with buttons rather than a subject-access request.

The list is DERIVED, not written twice. `lib/browser/stores.ts` takes its keys
from the same `FLOWS` the privacy page renders, and reuses that page's own
translated labels — so both pages name the same four things the same way in all
seven languages, and a fifth store cannot be added to one and forgotten by the
other. A settings page with its own list is a settings page that will one day
leave data behind while promising it is gone; a test asserts the join.

Sizes, not contents. "337 B" needs no knowledge of any store's shape and cannot
go stale; "11 saved words" needs four decoders that rot one at a time. And
export sits to the left of delete: somebody who wants to leave should meet the
way to keep their things before the way to destroy them.

Storage is subscribed to, not mirrored into state. `store.ts` next door already
models a single key as an external store, and this follows it: a delete here
announces itself, a delete in a second tab arrives on the `storage` event, and
the component needs no effect — which is the hydration mismatch this codebase
has been bitten by twice. The snapshot cache that `useSyncExternalStore`
requires is the one piece that can fail silently, so all three of its failures
are pinned by tests proven by mutation: never invalidating, never announcing,
and never caching each fail the test that names them.

Verified at 390px and 1280px on /de/settings with four stores seeded: rows wrap,
the delete targets are thumb-sized, and deleting one removes the row and
recomputes the total without a reload.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(technology): what the speaking evaluation measures, computed rather than claimed

The technology page described what the FIELD can do — corpora, error rates,
which vendors actually produce dialect — and then stopped short of the thing a
reader is there to judge: what this product does with any of it. That was the
explicit gap. It is now a panel, and the interesting part is that nobody wrote
its claims.

`lib/speech/capability.ts` declares five measures and the least evidence each
needs; the pack declares what recognition exists; the verdict falls out. So the
page renders "on the dialect" for delivery and "on Swiss Standard German" for
grammar because `evidence.ts` says dialect recognition translates rather than
transcribes — not because a copywriter decided that was a fair way to put it.
When Zurich German recognition improves past FORM_JUDGEMENT_MAX_WER, one number
in one pack changes and the page starts saying grammar is checkable on the
dialect, in seven languages, with no copy edit. Until then it cannot overclaim
even if somebody wants it to.

The refusal is a row, not a silence. Pronunciation is listed and marked refused,
because the measure every competitor advertises being deliberately absent is
the most informative thing on the page — and a flag beats a comment at stopping
a future contributor from reading the other verdicts as a roadmap. The word
error rates sit underneath, so a reader can disagree with our threshold instead
of being asked to trust a verdict.

Two things that were true and are no longer:

  "Heidi does not speak" — she does, since the de-CH voice. The line now says
  what actually happens: Heidi reads aloud, never claims to be speaking
  dialect, and stays silent rather than hand you an English voice reading
  Züritüütsch. Corrected in all seven languages.

  The overclaim register lived only in comments. §8 names the claims this
  product does not make, every engine file obeys it, and nothing stopped the
  sentence appearing in a dictionary — the one place a reader would see it.
  `lib/i18n/overclaim.test.ts` scans all seven for claim SHAPES rather than
  vocabulary, so "adults rarely reach native pronunciation" still passes while
  "93% native pronunciation" fails the build. Proven both ways: honest lines
  that must keep passing, forbidden lines that must fail, and an injected
  overclaim in real copy that the scan located by file and key.

Verified at 390px and 1280px on /de/technology: rows wrap, no overflow, the
refusal row reads as a decision.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(speaking): days spoken, counted — a number that cannot be lost

Stickiness, without becoming the thing this codebase already refused three
times. `saved/review.ts`, `practice/types.ts` and the practice session each
decline streaks, points and days-active, and they give the test they applied:
the product's success is how much of an unfamiliar Zurich speaker you
understand, and a streak measures how much Heidi you CONSUMED while looking
like it measures learning. That reasoning is not weakened here. It is applied
to the one surface it was not written about.

Speaking is production, not consumption. Everything else in the product is
something shown to the learner — a card, a clip, an answer — and a counter over
any of it is vanity. A take is the learner making speech in a second language,
which is the skill itself being exercised rather than evidence of having opened
an app. Counting the days somebody did that is measurement.

WHAT MAKES IT HONEST IS THAT IT CANNOT BE LOST. A streak is a count plus a
punishment, and all of its pressure comes from the reset — which is why streak
products send the notifications they send. Nothing here resets. `daysSpoken` is
the number of distinct local days with a take; it rises or holds, and a
fortnight away costs exactly nothing. Somebody returning after a month is told
they have spoken on eleven days, not that they have lost eleven. The test that
pins this is named for it, so anyone turning the count into a streak has to
delete a test that says what they are doing.

The design test for anything added here, written into the module header: would
a learner who stops for three weeks see a WORSE number than before they
stopped? If yes, it is a streak wearing a different name.

Details that keep the numbers true: several takes in one sitting are one day of
speaking, so re-recording is not rewarded over returning; time is phonation
rather than wall clock, so sitting with the recorder open deciding what to say
is not counted as practice; minutes round down, so a first thirty-second take
is thirty seconds and not "1 min"; days are LOCAL days in the browser's own
zone, which is a parameter rather than the runtime's, because a take at half
past midnight belongs to the day the speaker was living in.

Visually deliberate: the same figure grid as the per-take measurements directly
above, because these are the same kind of thing, and a louder treatment would
be the visual version of the claim the module refuses to make.

Verified at 390px with five takes across four days: 4 days, 5 recordings,
3 min — three columns, no dead cell, no overflow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(mobile): every tap target on every page, and the fifth thing the audit was wrong about

Thirty-three findings to zero, across sixteen pages at three widths.

Half of them were one bug. The header's link back to the start page was the
height of the mark inside it — thirty pixels — so the most-repeated control on
the site was also the most-missed, once per page. `min-h-11` on the anchor
fixes all sixteen and changes no layout, because the header's own padding
already exceeds it; only the hit area grows.

THE AUDIT WAS WRONG ABOUT THE CHECKBOXES, and that mattered more than the
checkboxes. A checkbox or radio wrapped in a label is tapped by the label — the
radio rows here are padded bordered blocks the width of the column, which is a
comfortable target reported as the worst one on the page. Acting on that
finding would have meant inflating a control nobody aims at while leaving the
actual target untouched. So the detector now measures the wrapping label for
those two input types, and only a WRAPPING label: a `for=`-linked label
elsewhere in the DOM is clickable too but need not be adjacent, and crediting a
control with the area of something across the page would hide a real problem.

This is the fifth false-positive class this report has lost, and the reason to
keep spending on it is that a finding a reader learns to skip past is worse
than no finding — it teaches them to skip the real one beside it. The change
proved itself immediately: the settings checkbox came BACK as 350x24, because
its label genuinely was one line tall, and only went away when the label was
fixed.

The rest were real, and each is a control somebody actually has to hit on a
phone: the conversation-list button in chat, the table of contents on /method,
the way back into reading from /practice, the source titles on /listen, the two
links on /impressum, and the two 28px icon buttons on every saved word — those
get 44px on phones only, which is not a compromise between devices: on a phone
they are always visible and are the only way to act on a word, while on a
desktop they appear on hover beside a pointer that can hit 28px.

One genuine ergonomic fix rather than a measurement one: the speech-rate slider
was a sixteen-pixel-tall track, every pixel of which was somewhere a thumb had
to land precisely to start a drag. It now has a 44px grab area with the track
still drawn at its natural height.

Audit: 33 findings → 0. Verified by watching it fall as each fix landed, which
is also the evidence the detector still fires.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 09:20:35 -07:00