Repository Public License Research preview
1# Session authoring guide23Practical contract for writing one session (a person or a delegated agent). Read first: `CLAUDE.md`, `docs/visual-design-system.md`, `docs/pedagogy.md`. **Reference implementation: `sessions/S01-what-is-an-llm/` — match its structure, depth and tone.**45## Ownership67- You own **only** `sessions/SXX-slug/`. Do not edit `course.yaml`, `latex/`, `brand/`, `tools/`, `tests/`, `docs/`, `assets/`, `reports/`, other sessions, or the Makefile. Do not run `make catalog`, `make sync`, `make lint`, `make qa`, `git add` or `git commit`: other sessions are being written at the same time and the lead integrates.8- If you need a change to a shared file (new macro, new icon, a bug in the theme), do not make it: work around it locally inside your figure/section files and record the request under `shared_requests` in `qa/results.json`.9- Title, outcomes, level and prerequisites come from `course.yaml` and must be copied unchanged into `metadata.yaml`.1011## Deliverables (all required; see CLAUDE.md §3 and the S01 tree)1213`README.md` · `metadata.yaml` · `slides/main.tex`, `slides/sections/*.tex`, `slides/speaker-notes.md`, `slides/references.bib`, `slides/source-registry.md`, `slides/.latexmkrc` · `figures/src/*.tex`, `figures/manifest.yaml`, `figures/rendered/` · `demos/README.md`, `demos/requirements.txt`, `demos/src/atlas_sNN/…` (with `demo.py`), `demos/tests/` · `labs/instructions.md`, `labs/starter/`, `labs/solution/`, `labs/rubric.md` · `quizzes/questions.yaml` · `video/script.md`, `storyboard.md`, `shot-list.md`, `captions-template.vtt` · `qa/checklist.md`, `qa/results.json`.1415Generated, never hand-written: `quizzes/explanations.md` and `accessibility/alt-text.md` (`python3 tools/render_docs.py --session SXX`).1617- Never create a file named `CLAUDE.md` or `CLAUDE.local.md` inside a session: coding agents working in this repository would load it as instructions. Teaching examples of such files use another name (e.g. `consignes-projet.md`) that learners rename in their own copy. An `AGENTS.md` is tolerated only inside a lab `starter/` directory that learners copy elsewhere.18- Lab folders whose code fails on purpose need a `conftest.py` that excludes them from pytest collection (see S13).1920## Content rules that are easy to miss2122- **French (fr-CA) for everything a learner reads**; English only for product names, code, commands, and terms defined at first use with `\AtlasTerm{français}{English}`. Code identifiers, comments and program output are in French too, as in S01.23- Deck: 20–35 content slides, each `\begin{frame}{…}` followed by `\label{SXX-Dnn}` numbered sequentially from D02 (D01 is the title slide), each with a short `\note{…}`. Open with `\AtlasTitleSlide`, end with `\AtlasReferences` and `\AtlasClosingSlide`. Include: hook with a motivating problem, audience and outcomes, roadmap, pre-test, definitions, worked example with reproducible numbers, a deliberately flawed example to critique (labelled as constructed), demo slides showing **real** program output, lab overview, diagnostic question, course map (`\def\AtlasMapCurrent{SXX}` then `\AtlasDiagram{ATLAS-F26}{ATLAS-F26-carte-du-cours}{…}`), takeaways, exercises and reflection.24- One idea per slide. If the log reports `Overfull \vbox`, cut or split — never shrink fonts. No `\tiny`, `\scriptsize`, `\includegraphics`, or `\fontsize` below 7 in decks (6 in figures).25- Figures: 3–5 original TikZ/PGFPlots figures per session, one file each, `SXX-Fnn-slug.tex`, at most 142 mm × 52 mm, declared in `figures/manifest.yaml` with every field S01 uses (alt text ≥ 150 characters). Implement the hero diagrams assigned to your session (CLAUDE.md §5) and set `hero_diagram` accordingly. Semantic colours only (`atlasFlow`, `atlasValid`, `atlasUncertain`, `atlasHazard`, `atlasFg`, `atlasMuted`, `atlasRule`, `atlasPanel`, `atlasBg`).26- **Every number shown in a slide or figure is produced by your demo code and asserted by a test.** For plotted data, write a small export script that generates `figures/src/SXX-Fnn-donnees.tex` (files ending in `-donnees` are data, not figures) and test that it is in sync, as S01 does.27- Demo and lab: Python standard library only, offline, deterministic (fixed seeds), no network imports, no secrets, no destructive commands. `demos/README.md` must contain the demo's exact current output and mention Windows and Python 3. The lab needs a **no-code path** (« sans code »), a Python path with a stdlib `verifier.py` (starter fails cleanly, solution passes), and an advanced challenge (« défi »). The starter must not contain the solution.28- Quiz: ≥ 10 questions; schema of S01; every outcome covered; ≥ 3 application/diagnostic; a rationale for every wrong option; balanced answer key; each question cites existing slide IDs.29- Video: 3–6 « Capsule » sections in `script.md`, first person for Simon-Pierre Boucher, the sentence « non enregistré » present, no invented anecdotes.30- Sources: primary sources, each with `url` and `urldate` in `references.bib` and a row in `slides/source-registry.md` (seven columns, same format as `docs/source-verification.md`). Check that each URL resolves (`python3 tools/validate_links.py --online --session SXX`) and say honestly what was verified. **No product-specific claim** (model names, limits, prices, CLI flags, protocol details) unless you read the primary documentation today and record URL and date; otherwise stay conceptual. Fictional examples are labelled fictional on the slide.31- Do not anthropomorphise; keep weights, context, application memory, retrieval and tools distinct.3233## LaTeX gotchas (learned on S01)3435- Figures are drawn with `[x=1mm, y=1mm]`; icon pics already compensate. Radii and lengths inside your own paths are in mm.36- babel-french under LuaLaTeX spaces `: ; ! ?` and « » automatically: type them plainly, no `\,` or `~`.37- Use `\AtlasCompare` and `\AtlasTriple` for side-by-side boxes; raw `columns` + boxes misalign vertically. Put `\vskip 1.5mm` between a box and a following `columns`.38- Frames containing `AtlasTerminal` or `AtlasCode` need `[fragile]`, and the environment must start at column 0. Keep listing content to Latin-1 characters.39- Tables: `\AtlasSizeSmall`, `p{}` columns with `\raggedright\arraybackslash`, header in `atlasMuted`, `\arrayrulecolor{atlasRule}\midrule`. Total width ≤ 134 mm plus column gaps.40- `\AtlasDiagram[skip]{SXX-Fnn}{SXX-Fnn-slug}{caption}`: the ID must prefix the file name.41- Citations: `\cite{key}` inside `\AtlasSource{…}` or inline; every bib entry cited (or `\nocite`).42- Math: operators such as `\ln`, `\mathrm{…}` and `\top` fall back to Latin Modern or are missing in Fira Math. Write `\text{ln}`, `\text{…}`, and check with `pdffonts dist/slides/SXX.pdf` that only Fira fonts are embedded.43- `\vskip 1mm` followed by a word starting with « plus » breaks (TeX reads a glue stretch): write `\vskip 1mm\relax`.44- End every line of a generated `-donnees.tex` file with `%`, and its `\input{…}%` too, or stray spaces shift the figure.45- A figure file whose name ends in `-donnees.tex` is treated as data and is **not rendered** by `tools/build.py`: never name a real figure that way.46- `AtlasTerminal` fits about 80 characters per line; design demo output accordingly.47- Copy `slides/.latexmkrc` from S01 and change the session ID in `$out_dir`.4849## Build, check, review (run from the repository root)5051```bash52python3 tools/build.py figures --session SXX # renders figures/rendered/* ; LOOK at the PNGs53python3 tools/build.py slides --session SXX # dist/slides/SXX.pdf, reports/build-SXX.json54python3 tools/build.py slides --session SXX --variant handout55python3 tools/render_preview.py --session SXX # dist/preview/SXX/contact-NN.png ; LOOK at every sheet56python3 tools/render_docs.py --session SXX57python3 tools/validate_structure.py # must show no error for your session58python3 tools/validate_latex.py --session SXX59python3 tools/validate_assets.py --session SXX60python3 tools/validate_quizzes.py --session SXX61python3 tools/validate_accessibility.py --session SXX62python3 tools/validate_links.py --online --session SXX63python3 tools/validate_labs.py --session SXX64python3 -m pytest -q sessions/SXX-*/demos/tests65```6667Visual review is mandatory: open the figure PNGs and every contact sheet, fix overlaps, clipping, overflow, cramped or orphaned text, then re-render. Iterate until clean. Record in `qa/results.json` (same keys as S01) what you actually did: `visual_review.status` is `"ai-reviewed"` when reviewed by an AI on rendered images, with reviewer, date, method, issues fixed and remaining observations; `ci.passed` is `false`. Set `status: implemented` in `metadata.yaml` only when every command above passes for your session; otherwise `draft`, with the blockers listed in `open_issues`. Never claim a check you did not run.6869## Final report (return to the lead)7071Status reached; counts (slides, figures, quiz questions, tests); validator results; what the visual review found and fixed; unresolved issues; `shared_requests`; any claim you could not verify.72