SPB Git

Repository Public License Research preview

session-authoring-guide.md 8.9 KB

# Session authoring guide

Practical 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.

# Ownership

  • 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.
  • 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.
  • Title, outcomes, level and prerequisites come from course.yaml and must be copied unchanged into metadata.yaml.

# Deliverables (all required; see CLAUDE.md §3 and the S01 tree)

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.

Generated, never hand-written: quizzes/explanations.md and accessibility/alt-text.md (python3 tools/render_docs.py --session SXX).

  • 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.
  • Lab folders whose code fails on purpose need a conftest.py that excludes them from pytest collection (see S13).

# Content rules that are easy to miss

  • 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.
  • 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.
  • 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).
  • 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).
  • 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.
  • 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.
  • 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.
  • Video: 3–6 « Capsule » sections in script.md, first person for Simon-Pierre Boucher, the sentence « non enregistré » present, no invented anecdotes.
  • 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.
  • Do not anthropomorphise; keep weights, context, application memory, retrieval and tools distinct.

# LaTeX gotchas (learned on S01)

  • Figures are drawn with [x=1mm, y=1mm]; icon pics already compensate. Radii and lengths inside your own paths are in mm.
  • babel-french under LuaLaTeX spaces : ; ! ? and « » automatically: type them plainly, no \, or ~.
  • 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.
  • Frames containing AtlasTerminal or AtlasCode need [fragile], and the environment must start at column 0. Keep listing content to Latin-1 characters.
  • Tables: \AtlasSizeSmall, p{} columns with \raggedright\arraybackslash, header in atlasMuted, \arrayrulecolor{atlasRule}\midrule. Total width ≤ 134 mm plus column gaps.
  • \AtlasDiagram[skip]{SXX-Fnn}{SXX-Fnn-slug}{caption}: the ID must prefix the file name.
  • Citations: \cite{key} inside \AtlasSource{…} or inline; every bib entry cited (or \nocite).
  • 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.
  • \vskip 1mm followed by a word starting with « plus » breaks (TeX reads a glue stretch): write \vskip 1mm\relax.
  • End every line of a generated -donnees.tex file with %, and its \input{…}% too, or stray spaces shift the figure.
  • 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.
  • AtlasTerminal fits about 80 characters per line; design demo output accordingly.
  • Copy slides/.latexmkrc from S01 and change the session ID in $out_dir.

# Build, check, review (run from the repository root)

bash
python3 tools/build.py figures --session SXX        # renders figures/rendered/* ; LOOK at the PNGs
python3 tools/build.py slides --session SXX         # dist/slides/SXX.pdf, reports/build-SXX.json
python3 tools/build.py slides --session SXX --variant handout
python3 tools/render_preview.py --session SXX       # dist/preview/SXX/contact-NN.png ; LOOK at every sheet
python3 tools/render_docs.py --session SXX
python3 tools/validate_structure.py                  # must show no error for your session
python3 tools/validate_latex.py --session SXX
python3 tools/validate_assets.py --session SXX
python3 tools/validate_quizzes.py --session SXX
python3 tools/validate_accessibility.py --session SXX
python3 tools/validate_links.py --online --session SXX
python3 tools/validate_labs.py --session SXX
python3 -m pytest -q sessions/SXX-*/demos/tests

Visual 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.

# Final report (return to the lead)

Status 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.

Files main
Menu

Theme