mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 12:37:06 +01:00
batch-2
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
083dd52f0d |
feat(engine): courses in data, pack-declared forms, level sources, and meanings in the learner's language (#355)
* feat(course): every stored record names its course, and today's progress is the Zurich course's A course registry (lib/course/registry.ts) lists the one course there is; lib/variety/active.ts resolves its pack. Browser stores that hold course progress move to an envelope keyed by course under .v2 keys, and a value under the old .v1 key is read as the default course without being rewritten. progress_devices, certificates and entitlements gain a course column that defaults to the Zurich course. Item ids are unique across courses, and the default course's ids are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(variety): the pack declares its articles, persons, respellings, voices and prompt lines Article, FormLabel and VocabularyGroup were closed unions of the Zurich values, the answer comparison folded Zurich respellings for every language, word distance lower-cased as German, the voice ranking named two German tags and the prompt builder carried Swiss spelling advice. Each is now a field of the pack, read by the engine; a contract test over every pack refuses a value the pack did not declare, and the leak test also looks for the taught language's own words in engine code. The Ukrainian pack gains one verb with its own pronouns and no articles. The 2,956 published items and the system prompt are byte-identical. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(practice): an item's level comes from a source the course chooses A course entered from a sibling language measures each item's distance from that language, exactly as before; a course entered from zero reads a declared CEFR band on the word, the line or the topic. levels.ts exposes both as LevelSource and picks by Course.entry. Every published item keeps its level. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(meaning): a meaning can be shown in the learner's language A meaning is the bridge form plus an optional gloss in the interface language. One pure rule (lib/domain/meaning/meaning.ts) decides what is printed from the learner's answer to «Wie gut ist dein Deutsch?»: good shows German only, as before and by default; some shows German and the gloss; none shows the gloss; without a gloss German is always shown. Every exercise, the word list and the scene pages print meanings through one component. The answer is a course store, set in the settings and asked once after the start card, only in an interface language that has glosses. Gloss sets are one file per course and language, loaded on demand. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * content(glosses): English and Russian meanings for every word and scene line; French and Italian for every word Machine drafts from the Zurich form and its German meaning together, marked unreviewed in the data. One file per language beside the pack, keyed by the German the course gives. Tests refuse a key no entry carries, an empty gloss and two glosses for one German form; pnpm run glosses:coverage prints what is covered. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * content(glosses): French and Italian meanings for every scene line Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * docs: courses, pack-declared forms, level sources and glosses, as they now are Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(variety): the pack says which grammatical person each of its labels is The gloss check and the prompt's auxiliary table, both new on main, matched the Zurich labels «ich» and «er» by name. The forms pass of the leak test caught it on rebase. The pack now declares personOf, and both read it; the system prompt and the published items are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |