Show HN: Pencil – LLM writes whiteboard lessons as JSON, a browser draws them A developer released Pencil, an open-source tool that has a large language model write a whiteboard lesson as strict JSON, validates that JSON with a Node script, and plays it back in a single-file browser player that draws SVG figures in sync with narration by word index. The planner defaults to DeepSeek's deepseek-flash model, requires only the Python standard library, and prints token counts and per-lesson cost from user-supplied input and output token prices plus an --inr-per-usd rate of 88; an Anthropic provider path exists but is untested live. The project includes a repair loop that feeds validator issues back to the model, unit tests using a scripted fake model, and headless-Chrome player tests covering playback, quizzes, bad input and XSS safety. A small open-source take on the "AI teacher that draws on a whiteboard" idea: a model writes a lesson as strict JSON, code validates it, and a browser player draws it in time with the narration. Everything here prompts, schema, player is original code. Live demo https://vbs2004.github.io/pencil/ : a lesson written by DeepSeek, played by the single-file player press Play, untick "Silent" for voice . php topic -- planner.py -- LLM -- lesson.json -- validator.js -- issues -- repair loop | v player.html SVG draw-on + speech, cues by word index open player.html plays the built-in rainbow sample no server needed node validator.js samples/rainbow.json exit 0 = valid; prints issues as JSON otherwise export DEEPSEEK API KEY=... default provider; stdlib only, no pip install needed python3 planner.py --topic "How tides work" --minutes 4 --out lesson.json \ --price-in