Natural-Language Lesson Rules: L1–L7
Claude Rules Workflow
Chapter 4 · Natural-Language Lesson Rules: L1–L7
Alongside the numbered programming courses P1–P13 governs, this site also generates standalone lessons in real human languages — Japanese, Hungarian, French. Those lessons follow a completely separate set of rules, language_rules.md's own L1 through L7, because a language lesson genuinely isn't shaped like a course chapter: there's no fixed chapter count, no Fundamentals/Intermediate/Advanced track, and a single topic (say, "question words") gets requested and generated on demand, in whichever language the learner actually wants it in.
L1 — The Languages Table & Learner Profiles
A small table tracks every language currently in use, each with its own level, its own per-country accent colour, and a short learner profile (goals, current knowledge, why they're learning it) that shapes how every lesson in that language gets written:
That "no kanji yet" detail isn't decorative — it directly shapes how a Japanese lesson gets written. Every kanji that does appear still needs a romaji reading right beneath it, since the learner can't yet read it unaided.
L2 — The <language>:<topic> Prompt Convention
A prompt like hungarian:question words means exactly what it looks like — generate a lesson, in that language, on that topic. The colon is the whole signal that distinguishes this from P5's course-chapter convention: hungarian:question words is a language lesson; rules1-4 (no colon) is a course chapter. No outline step is needed either way — a lesson generates directly the moment it's requested.
L3 — A PDF for Every Single Lesson
Unlike P4 (which only fires once, on a course's final chapter), every language lesson gets its own PDF immediately, via a reusable builder script that detects the language straight from the filename prefix and applies that language's own accent colour and flag automatically.
HTML_DIR/PDF_DIR constants were still hardcoded to a pre-rebuild scratch location — claude-storage\html and claude-storage\pdfs — left over from before this project's own big folder restructuring. Generating this session's Hungarian, Japanese, and French lessons meant the script would have written the PDFs to a stale location no chapter actually lives in anymore. It was fixed in place: each language's own real content/<country>/<language>-language/ folder is now computed directly from the same LANGS table that already held each language's accent colour — one dictionary, no separate path config to fall out of sync with it again.
L4 — The Two Lesson Sub-Formats
Not every language lesson is shaped the same way. A plain topical lesson ("directions," "food," "question words") uses sub-format A: a six-card dialog grid demonstrating the topic in natural conversation, followed by a fixed 20-word vocabulary table. A lesson specifically about a verb tense or conjugation pattern (Hungarian's past definite tense, for instance) uses sub-format B instead — full conjugation tables and a pattern box come first, with the dialog grid and vocabulary table still following after.
| Aspect | Sub-format A — Topical | Sub-format B — Grammar/Verb-Tense |
|---|---|---|
| Trigger | An ordinary topic ("food," "directions") | A tense/conjugation name ("past definite tense") |
| Opens with | The dialog grid directly | A conjugation grid + pattern box, before the dialogs |
| Vocabulary table | Fixed 20 rows | 20 rows, verbs shown in their target-tense form |
L4a layers one more detail on top of either sub-format: every language gets its own single accent colour, derived loosely from its flag — Japanese red, Hungarian green, French blue, all visible in the language cards above — kept consistent across every lesson in that language so a glance at a page identifies which language it's in before reading a word of it.
L5 — Introducing a Brand-New Language
A lesson request in a language that isn't already in the L1 table doesn't generate silently. Per L5, the correct response is to ask first — is this genuinely a new language to add, or a one-off/typo? What's the learner's actual level? What accent colour fits, without clashing with a language already in the table? Only once those questions are answered does the language get added to L1 and the first lesson actually generated.
L6 — Verb Deep Dive Lessons
vdd:hungarian:lenni or vdd:japanese:to be requests something narrower and deeper than an ordinary topical lesson — a full treatment of one specific verb, built entirely around L4's own sub-format B (conjugation tables across the language's own relevant tenses, plus mini-dialogues using that verb and a labelled vocabulary list of related verbs). When a VDD is requested across several languages in sequence, each one is generated and then paused on, rather than all being produced back to back unprompted.
L7 — Song Lessons, and the Copyright Line That Splits Them in Two
song:title:artist:language produces a full, line-by-line lesson from real song lyrics — but only for lyrics that are genuinely copyright-free (public domain, traditional, or original material). songvocab:title:artist:language exists specifically for everything else: it never reproduces the lyrics themselves in any form, extracting only individual, decontextualized vocabulary words instead — which is legally safe even from a commercially copyrighted song, since isolated words and their translations aren't the protected creative expression the way the lyrics' actual sequence and phrasing are.
Coding Challenges
A learner asks for "spanish:ordering coffee," and Spanish has never appeared in the L1 table before. Walk through, step by step, what should happen before any lesson content is generated, per L5.
📄 View solutionExplain why "hungarian:past definite tense" and "hungarian:food" produce genuinely different-looking lessons, even though both are triggered by the exact same L2 prompt shape.
📄 View solutionA user wants a lesson built from the full lyrics of a song currently in the commercial charts. Using L7, explain what CAN and CANNOT be generated, and why the distinction exists.
📄 View solutionChapter 4 Quick Reference
- L1 — the languages table: level, accent colour, and learner profile per language
- L2 — <language>:<topic>, colon-separated, distinct from P5's hyphenated course-chapter shorthand
- L3 — every lesson gets its own PDF immediately, unlike P4's course-completion-only trigger
- L4 — two sub-formats (topical vs. grammar/verb-tense), plus L4a's one accent colour per language
- L5 — a genuinely new language triggers real questions (level, accent, goal) before any lesson generates
- L6 — vdd:<language>:<verb> for a focused, single-verb deep dive using sub-format B
- L7 — song: for copyright-clear full lyrics; songvocab: for vocabulary-only extraction, safe for any song
- Next chapter: the more specialized content rules — kanji pages, and the Python/programming lesson family