Both books were already complete on Qdrant and answering /api/ai/ask, but had no Grade/Unit/Node/Lesson rows, so none of their problems could ever reach a quiz. The owner made the product call, so the curriculum is now seeded from the books' own tables of contents (free, no API credit), and 559 four-option questions were authored from the verified chunks. Coverage: all 21 nodes of grade 11 hold a full four-question quiz, and 10 of 12 in grade 12. The two that do not are both in فصل ۵: کاربردهای مشتق and are short only because the weekly model limit landed mid-run — their (lesson, problem) pairs are already exported and waiting. Three supporting changes: - generate_questions_from_chunks grows --export DIR, which writes the (lesson, verified problem) pairs as JSON batches and makes no paid call at all. The subagent route was the documented way to author questions but had no tool behind it; now it does, and it emits the same PROMPT the paid path uses so the two branches cannot drift apart in quality. - _targets now skips as many chunks as a lesson already has questions for. Re-running with a higher --per-lesson used to hand back the very same chunk, producing a near-duplicate question — silently, because the prompt gets rewritten each time, so neither the run nor question_io's validation could catch it. - GRADE_STYLE gains یازدهم and دوازدهم. Without them both grades fell to the grey fallback; they are deliberately cool colours, separate from the six general grades, because حسابان is a ریاضیفیزیک-only book. 458 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
11 KiB
11 KiB