name: jlpt-n5-reading-passage-creator description: "Generate JLPT N5 reading passages (short or mid type) in JSON format. Use this skill when the user asks to create, generate, or produce N5 reading passages, comprehension texts, or reading questions. Handles the full pipeline: Japanese core content generation, 5-language translation, file saving, and optional Firebase upload. Trigger on requests like 'N5 okuma metni üret', 'create N5 reading passage', 'short passage oluştur', 'mid passage yaz', 'generate reading comprehension', 'JLPT N5 okuma sorusu oluştur'."
JLPT N5 Reading Passage Creator
Generate N5-level reading passages (core Japanese + 5-language translations).
References
- JSON schemas and field rules: See references/json-schema.md
- N5 scope and quality rules: See references/n5-reading-guidelines.md
Workflow
- Determine passage type from user request:
short(80–150 words, 1–2 questions) ormid(200–350 words, 2 questions). Default:short. - Read
references/json-schema.mdfor exact field specifications. - Read
references/n5-reading-guidelines.mdfor N5 vocabulary, grammar scope, and quality rules. - Read
backend/reading/data/n5_passages_{type}_core.jsonto find the last ID number. New passage ID =n5_reading_{type}_{NNN}(next sequential number, zero-padded). - Generate the passage:
- Write natural N5-level Japanese prose.
- Decide
visual_type(notice,memo,letter,email,none). - If
visual_type ≠ none: put context text insentences, boxed content inframed_sentences. Otherwise: use onlysentences. - Add
furigana:<ruby>漢字<rt>reading</rt></ruby>for every kanji word only. - Add
romajiin Modified Hepburn. - Write questions (1–2 for short, 2 for mid) with 4 options each; exactly 1
is_correct: trueper question. - Sentence IDs: s1, s2… continuous across
sentences+framed_sentences.
- Append new passage to
backend/reading/data/n5_passages_{type}_core.json. - Validate: Run
jlpt-reading-passage-testerskill on the file. Fix any failures, re-run until all pass. - Generate translations for all 5 languages (en, tr, de, fr, es):
- Translate every sentence (both
sentencesandframed_sentences) naturally and idiomatically. - Add
mining_textper sentence: localized grammar/chunk explanation + vocabulary list (see mining text headers in json-schema.md). - Translate question text and all 4 option texts.
- Translate every sentence (both
- Distribute translations: Append each language's translation entry to
backend/reading/data/n5_passages_{type}_translations_{lang}.json. - Upload prompt: Ask the user whether to upload to Firebase. If yes:
Note: This uploads all N5 passages (short + mid). Existing passages are safely overwritten (Firestore uses set()); the new passage is added alongside them.python3 backend/reading/scripts/upload_passages_v2.py n5 - Output a summary: passage ID, type, question count, languages translated, upload status.
Quality Rules
- All vocabulary and kanji within N5 scope.
- Questions must be answerable ONLY from the passage text.
- Exactly 1 correct option per question; 3 plausible distractors using passage vocabulary.
- Default: 1 passage per run unless user specifies more.