Guide · 01 of 09
Lessons & Slides
A Prism file is either a bare scene { ... } (one visualization) or a lesson { ... } (a full multi-slide lesson). A slide is a composition: any prose, at most one scene, at most one exercise, and any number of goals — in any order. There is no "text slide" vs "quiz slide"; you just include the parts you need.
lesson#
The top-level container. Holds lesson metadata and an ordered list of slides. These properties are the source of truth for how the lesson appears in the catalog: unit groups it under a heading on the course page, difficulty and icon render on its card, and summary is the one-line description. course tags which track it belongs to; skills lists the skill ids it teaches. An unknown property here is a compile error, so a typo cannot silently drop your metadata.
lesson "Title" { [course: "..."] [unit: "..."] [difficulty: "Beginner"|"Intermediate"|"Advanced"] [icon: "..."] [summary: "..."] [skills: ["...", "..."]] slide "..." { ... } ... }
| prop | type | description |
|---|---|---|
| course | string | track id, e.g. "calculus" |
| unit | string | unit heading on the course page |
| difficulty | "Beginner" | "Intermediate" | "Advanced" | shown on the lesson card |
| icon | string | lesson card icon, one of: Check, ChevronRight, Circle, Dumbbell, FunctionSquare, LineChart, Link, Lock, MapPin, Move, Play, Ruler, Sigma, Star, TrendingUp, Triangle, Undo2, Waves, X |
| summary | string | one line describing the lesson |
| skills | string[] | skill ids this lesson teaches |
Example
slide#
One screen of a lesson. Compose it from prose, an optional scene, an optional exercise (quiz/build), and optional goals. cat groups slides into sections; skill tags the specific skill this slide drills.
slide "Title" { [cat: "..."] [skill: "..."] > prose... scene ... { ... } <exercise> goal "..." { ... } }
| prop | type | description |
|---|---|---|
| cat | string | section/category label |
| id | string | stable id (auto-slugged from the title if omitted) |
| skill | string | skill id this slide targets |
| hidden | boolean | keep off the main path; only reachable as an onwrong: detour |
Example
>#
A prose line. Everything after > is raw text — markdown (**bold**, *italic*) and $inline$ / $$display$$ LaTeX all work. Consecutive prose lines join into one paragraph.
> markdown text with $latex$Example
goal#
Gates the slide's Continue until the learner satisfies when (a boolean expression over the scene's state — it latches once true). Use it for guided tasks like "drag the vertex below the axis".
goal "Instruction" { when: <condition>, [hint: "..."] }
| prop | type | description |
|---|---|---|
| when* | expr | boolean condition over scene state |
| hint | string | nudge shown if the learner is stuck |
Example
onwrong#
Adaptive branching. Goes inside any exercise: if the learner gets it wrong, they take a detour to the named slide (which must be a hidden: true slide in the same lesson) and then come back. A scaffold is an ordinary slide, so it can carry its own prose, scene, and exercise. Add retry to return the learner to the original question for another attempt; leave it off to move them forward instead. Detours fire at most once per question and cannot chain.
onwrong: "slide-id" [retry]
| prop | type | description |
|---|---|---|
| onwrong* | string | id of the hidden slide to detour to |
| retry | flag | send them back to the question afterwards instead of onward |
Example