Add the term, equation, value, and misconception registries (src/model/course/glossary.rs) and the new optional fields on objectives, targets, lectures, readings, bank options, and policy. Load registry entries from objective files, glossary.yaml, and course.yaml, with one definition site per id as for every other registry. Port every edit in docs/design/2.1/build_schemas.py into the hand-written schema builders, add glossary.schema.json, and test the generated schemas against the targets; the only differences are two 2.0 spellings the code already had. The 2.0 example fragments load and validate unchanged. The 2.1 example bank gains `status: draft`, which every coursebank item requires. tests/docs.rs skips docs/design/, which holds design records rather than guide pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
coursebank 2.1 and the lecture-spec pipeline
| file | what it is | who reads it |
|---|---|---|
CLAUDE-CODE-PROMPT.md |
the prompt for a new Claude Code session in the coursebank repository; copy this folder to docs/design/2.1/ and paste the prompt |
you, then Claude Code |
SCHEMA-CHANGES.md |
the specification: what changes, why, the rules, the rendering, the migration | Claude Code (authoritative), you (to review) |
schemas/ |
the target 2.1 JSON Schemas (glossary.schema.json is new) |
Claude Code |
schemas-original/ |
your 2.0 schemas, so diff -r schemas-original schemas shows every change |
|
build_schemas.py |
the script that produced schemas/ from schemas-original/, every edit in one place |
|
examples/v20/ |
2.0 fragments that must still validate | tests |
examples/v21/ |
a small 2.1 course using every new field; lecture-page-preview.md is the page it should render |
tests, and you, to see the format in use |
examples/migration/ |
a 1.0 terms.yaml and values.yaml and the glossary.yaml the migration should write |
tests |
prototype/check21.py |
an executable sketch of every new rule; --selftest breaks the example once per rule, --page l09 prints the lecture page |
Claude Code (to port), you (to try the rules) |
PIPELINE-DESIGN.md |
the design of the lecture-spec pipeline, built once coursebank validates 2.1 | you |
Checked here: every schema is valid JSON Schema (2020-12); the 2.0 examples validate under both 2.0 and 2.1; the 2.1 examples and the migration's expected output validate under 2.1, merged and as fragments; the 2.1 fragments are rejected by 2.0; bad ids, bad enum values, unknown keys and missing required fields are rejected; all 19 prototype rules fire on their broken case; the example course has no errors.