Module lesson

Module lesson 

Source
Expand description

The lesson schema: a typed model and its validating parse boundary.

Holds the Lesson/Exercise types, the Language enum, the LessonId newtype, and Lesson::parse — the only constructor, which deserializes a YAML document and then enforces the semantic rules (notably the {student_code} placeholder) so a constructed Lesson is valid by type (ADR-0003). This module does not execute code, call LLMs, or render output; that belongs to the runner, provider, and cli layers.

Structs§

Exercise
The exercise a lesson poses.
Lesson
A single lesson: its identity, language, and exercise, with optional prose.
LessonId
A lesson’s stable identity.

Enums§

ExerciseKind
The kind of exercise a lesson poses.
Language
The language a lesson is authored in.
LoadError
Why a lesson file could not be loaded.
ValidationError
Why a YAML document is not a valid lesson.

Functions§

read_lesson_file
Read and parse a lesson from a file on disk.