Lesson File Structure
A lesson is Markdown with three structural elements:Triggers
Triggers are inline commands in narration using double-brace syntax:{{verb: arguments}}. They fire at the word position where they appear in the text.
show
Reveal a named visualization block on stage.- target: Block name (required)
- animation: Optional effect, duration, easing
- In split mode: Appends block alongside existing blocks
- In normal mode: Replaces whatever is currently displayed
focus
Highlight a specific region within a block. Everything else dims.- target: A region name defined in the block’s region footer
- none: Clears focus (everything returns to normal brightness)
- Only one focus active at a time
clear
Remove all blocks and reset the entire scene. Hard scene break.- transition:
fade(default),slide, orinstant - animation: Optional duration and easing override
- Use between conceptual sections, not within a section
annotate
Attach a text label to a region. Renders as a floating callout.- target: Region name (required)
- text: Quoted string (required). Keep to 2-5 words
- Annotations persist until the next
{{clear}}
zoom
Scale the visualization. Centers on the targeted region.- scale: Multiplier in
Nxformat:0.5x,1x,1.2x,1.3x,2x - target: Optional region name
1xresets to normal scale
split / unsplit
Enable multi-panel mode for side-by-side comparisons.splitstays active untilunsplitorclear- Max 2 panels (left=code, right=visual)
More Triggers
pulse
pulse
Briefly emphasize a region without changing focus
trace
trace
Animate a path through edges or connections
transform
transform
Morph one block into another with visual continuity
show-group / hide-group
show-group / hide-group
Reveal or remove multiple blocks at once
Animation Tokens
Animation tokens trail the target inshow, hide, and clear triggers.
Effects
| Effect | Enter Behavior | Exit Behavior | Best For |
|---|---|---|---|
fade | Opacity 0→1 | Opacity 1→0 | General purpose (default) |
slide | From right | To left | Progression, new concepts |
slide-up | From bottom | To top | Results, conclusions |
grow | Scale from center | Scale to center | Focal elements, data structures |
typewriter | Lines appear sequentially | Fade out | First code reveals |
none | Instant | Instant | Reference material |
Duration
Easing
| Easing | Description | Use When |
|---|---|---|
ease-out | Fast start, gentle stop | Elements entering (default) |
ease-in-out | Gentle start and stop | Elements moving on screen |
spring | Physics-based with overshoot | Playful, snappy, data structures |
linear | Constant speed | Typewriter, mechanical processes |
reveal | Smooth cinematic reveal | First reveals, dramatic moments |
emphasis | Punchy overshoot | Drawing attention, key concepts |
handoff | Calm handoff between scenes | Scene transitions, topic changes |
Visualization Block Types
Code Blocks
Syntax-highlighted source code with line-level animation and focus.lang=<language>: Syntax highlighting (typescript, javascript, python, rust, go, java, c, cpp, sql, bash, html, css, json, yaml, text)
// ! annotation text on a code line. Stripped from display, rendered as floating callout.
Region targets: Line numbers, ranges, or combinations:
Data Blocks
Data structure visualizations. Supports 40+ types. Array:Diagram Blocks
Architecture-style node-and-edge diagrams with AWS icons.[service], [database], [client], [user], [cache], [queue], [load-balancer], [api-gateway]
Edges: --> (directed), --label--> (labeled)
Groups: {Group Name: node1, node2} (visual cluster)
Preview Blocks
HTML or React rendered in an isolated iframe. Raw HTML:Math Blocks
LaTeX expressions via KaTeX.Chart Blocks
Data visualizations with labeled axes.bar (default), line, scatter, area
Regions
Named sub-elements within a block. Defined in a footer section below a--- separator.
Target Format by Block Type
| Block Type | Target Format | Examples |
|---|---|---|
| Code | Line numbers, ranges | 2, 3-5, 1, 4-6, 9 |
| Data | Node/element IDs | head, n1, n2 |
| Diagram | Node IDs | api, db, cache |
| Math | Expression IDs | expr-0, expr-1 |
| Chart | X-axis labels | Q1, Feb |
Naming Conventions
Use short, semantic names that describe what the region represents. Good:signature, loop-body, hash-step, collision-slot
Bad: line-2, top-part, the-important-bit
Narration Craft
The Voice
You are narrating a film, not writing a textbook. The voice is an expert explaining something to a curious colleague over coffee. Good:You have a list of a million names and you need to find one. Starting at the front and checking each entry could take a million steps. Hash maps do it in one.Bad:
Hash maps are a fundamental data structure that provide O(1) average-case lookup time using a hash function to compute array indices.
Sentence Rhythm
Short declarative sentences form the backbone. Vary length to create rhythm:The greedy approach fails. Picking the nearest neighbor doesn’t guarantee the shortest path. We need something smarter.Three sentences: short (4), medium (9), short (4).
Questions Create Anticipation
Word Choice for TTS
| Written | TTS Says | Write Instead |
|---|---|---|
O(n) | ”oh en" | "O of n” or “linear time” |
2^6 | ”two caret six" | "two to the sixth power” |
&& | ”ampersand ampersand" | "and” |
=== | ”equals equals equals" | "strict equality” |
Introduce Terms Before Naming Them
Plain English first, then the technical term. Good:Two keys land in the same slot. This is called a collision.Bad:
A collision occurs when two keys hash to the same index.
The Mirror Principle
The single most important rule in Handhold authoring. What is spoken must be what is shown. At all times. The screen is a mirror of the narration.Never Talk About Something Invisible
If a block isn’t on screen, you can’t talk about it. Bad:Never Show Something Without Explaining It
Bad:Trigger Placement
Triggers fire at their word position in the narration. Placement determines synchronization.Place Triggers at the Exact Word
{{focus: X}} goes immediately before the words that describe X:
Multiple Triggers on One Position
This is normal and expected:Common Trigger Patterns
Introduce a new block
Introduce a new block
Walk through regions
Walk through regions
Emphasize with zoom + annotate
Emphasize with zoom + annotate
Compare with split
Compare with split
Reset before moving on
Reset before moving on
Course Architecture
Design arcs, steps, and blocks
Creating Labs
Build hands-on coding exercises