Validate JLPT sentence building (starQuestion) JSON files produced by jlpt-n5-grammer-sentence-building-question-creator. Use this skill when the user asks to test, validate, check, or verify sentence building questions in JSON format. Checks: (1) schema/format correctness of all fields, (2) correctOrder is a valid permutation of [0,1,2,3], (3) starPosition is 0-3, (4) scrambledWords has exactly 4 items, (5) level is n5. Trigger on requests like 'sentence building soruları test et', 'validate sentence building questions', 'cümle birleştirme soruları doğrula', 'check starQuestion JSON', or after generating questions with the sentence building creator skill.
Validate JLPT N5 sentence building question JSON using scripts/validate.py.
# From a file
python3 <skill_dir>/scripts/validate.py <path/to/questions.json>
# From stdin (JSON in context)
python3 <skill_dir>/scripts/validate.py --stdin <<'EOF'
{ ...json... }
EOF
sentencePrefix + scrambledWords in correctOrder sequence + sentenceSuffix.scrambledWords are NOT already in the correct order (must be shuffled).starPosition marks a meaningful grammar point for testing.| Check | Rule |
|---|---|
id format | Must match n5_grammer_sentence_building_XXX (zero-padded sequential number) |
level | Must be "n5" |
type | Must be "starQuestion" |
sentencePrefix | Must be a non-empty string |
sentenceSuffix | Must be a non-empty string |
scrambledWords | Must be an array of exactly 4 non-empty strings |
starPosition | Must be an integer 0–3 |
correctOrder | Must be a permutation of [0, 1, 2, 3] |
The script prints a report with PASS or FAIL per question and a summary line.
Exit code 0 = all passed, 1 = one or more failed.
After running, if the script passes proceed to linguistic review. If it fails, summarize failures so the user knows what to fix.