Repository Public MIT Research preview
1# Architecture23How the repository is organised, what generates what, and how to build it. Specification: `CLAUDE.md`.45## Principles671. **Single sources of truth.** A fact is written once and propagated by code.82. **Everything reproducible.** Decks, figures, numbers, reports and catalogs are rebuilt by `make`.93. **Honest status.** Readiness is computed from evidence (`reports/STATUS.md`), not declared.104. **Offline by default.** Building, testing and running labs need no network and no account.1112## Sources of truth and what they generate1314| Source (edit this) | Generator | Generated (do not edit) |15|---|---|---|16| `course.yaml` — identity, author, affiliation, language, parts, 24 sessions, outcomes, prerequisites | `tools/sync_course.py` | `latex/atlas-course.tex`; `metadata.yaml` and `README.md` of *planned* sessions |17| `course.yaml` + session metadata + build reports | `tools/generate_catalog.py` | `docs/curriculum.md`, `assets/shared-diagrams/ATLAS-F26-carte-du-cours.tex`, `site/catalog.json`, `reports/STATUS.md`, `reports/status.json` |18| `sessions/SXX/quizzes/questions.yaml` | `tools/render_docs.py` | `quizzes/explanations.md` |19| `sessions/SXX/figures/manifest.yaml` | `tools/render_docs.py`, `tools/validate_assets.py --write` | `accessibility/alt-text.md`, `assets/asset-register.csv` |20| session demo code (e.g. `demos/src/atlas_s01/corpus.py`) | the session's export script | figure data files `figures/src/*-donnees.tex` |21| `brand/colors.tex`, `brand/typography.tex` | loaded by `latex/atlas-colors.sty`, `latex/atlas-theme.sty` | every deck and figure |2223`--check` on each generator fails when an output is stale; `make lint` and CI run these checks.2425## Directory map2627```text28course.yaml single source of truth for identity and curriculum29brand/ palette, typography, logo source, identity guide30latex/ class (atlas-beamer.cls), theme, colour system, figure studio, accessibility helpers31 components/ boxes, structural frames, code listings32 tikz-library/ shared visual grammar (styles, token rows, context bands) and original icons33 pgfplots-library/ plot styles34 templates/ standalone figure wrapper35assets/ shared diagrams, icon sheet, font manifest, asset register36datasets/ synthetic datasets and provenance37sessions/SXX-slug/ one self-contained session (see CLAUDE.md §3)38tools/ build, generators, validators (Python: standard library + PyYAML; Pillow optional)39tests/ repository-level tests (pytest)40docs/ this documentation41reports/ machine- and human-readable status and QA reports42site/ catalog data for a future static site (optional, not a prerequisite)43dist/ generated PDFs, previews and build directories (ignored by git)44```4546## LaTeX layering4748```text49sessions/SXX/slides/main.tex50 └─ \documentclass{atlas-beamer} options: print | handout | notes51 └─ atlas-theme.sty fonts, babel (french), frame chrome, footer attribution, progress bar52 ├─ atlas-colors.sty ← brand/colors.tex semantic colours, dark and print values53 ├─ typography.tex ← brand/ Fira Sans/Mono by file name, Latin Modern fallback54 ├─ atlas-figures.sty ← tikz-library/, pgfplots-library/55 ├─ atlas-accessibility.sty language metadata, status marks, term macros56 ├─ atlas-course.tex ← course.yaml (generated) author, institution, course titles57 └─ components/ boxes, frames (title, section, roadmap, references, closing), code58```5960Figure sources are plain `tikzpicture` files. The same file is `\input` in a deck through `\AtlasDiagram` and rendered alone through `latex/templates/figure-standalone.tex` (dark and print). Files are found through `TEXINPUTS`, set by `tools/build.py` and by each session's `slides/.latexmkrc`.6162Engine: **LuaLaTeX** via `latexmk`, bibliography with **biblatex + biber**. Builds set `SOURCE_DATE_EPOCH` for stable PDF dates.6364## Build and quality pipeline6566```text67make sync → make slides / handouts / notes → make preview → make lint → make test → make catalog68 └ contact sheets for HUMAN review → qa/results.json69```7071| Target | Tool | Output |72|---|---|---|73| `make setup` | `tools/check_toolchain.py` | list of present and missing components (installs nothing) |74| `make slides [SESSION=]` | `tools/build.py slides` | `dist/slides/SXX.pdf`, `reports/build-SXX.json` |75| `make handouts` / `make notes` | `tools/build.py slides --variant …` | `SXX-handout.pdf` (light, overlays collapsed), `SXX-notes.pdf` |76| `make figures` | `tools/build.py figures`, `shared` | `figures/rendered/*.pdf, .png, .svg, -print.*` |77| `make preview` | `tools/render_preview.py` | `dist/preview/SXX/page-NN.png`, contact sheets, PDF checks |78| `make demo` / `make demos` | `tools/validate_labs.py --demo-only --show` | demo output |79| `make test` / `make tests` | `pytest` | repository tests + session tests |80| `make lint` | all `validate_*.py`, `--check` generators | `reports/*.json` |81| `make links` | `tools/validate_links.py --online` | `reports/links.json` (needs network) |82| `make catalog` | `tools/generate_catalog.py` | curriculum, course map, status |83| `make qa` | all of the above | everything |84| `make clean` | — | removes `dist/` and caches only |8586## What the validators enforce8788- **structure** — required files per status, metadata vs `course.yaml`, instructor attribution, sequential slide IDs with speaker notes, no placeholder text, French learner-facing files, honest `validated` label, no media files, video-duration estimates.89- **latex** — shared macros defined, `\input`/figure/citation integrity, bibliography fields, French frame titles, type-scale minimum, no `\includegraphics`; after a build: no errors, undefined references, missing glyphs, font fallback or overflow.90- **assets** — manifest completeness, renders present, register in sync, no stock/raster/media files, secret scan.91- **quizzes** — schema, answer keys, explanations, distractor rationales, outcome coverage, question variety, slide references.92- **accessibility** — WCAG contrast of the palette in both modes, alt-text length, generated files current, captions template honesty, PDF metadata.93- **links** — source registry completeness; optional online resolution.94- **labs** — demos run and match their documented output, tests pass, solutions do not leak, safe commands, offline, cross-platform notes.9596Subjective quality (composition, clarity, pacing) is reviewed by a person looking at the rendered slides and recorded in `sessions/SXX/qa/results.json`. Automated checks never stand in for that review.9798## Toolchain99100| Component | Version used for the current build | Notes |101|---|---|---|102| TeX Live | 2026 (LuaHBTeX 1.24.0) | packages: beamer, pgf/tikz, pgfplots, tcolorbox, biblatex, fontspec, unicode-math, babel-french, csquotes, standalone, colortbl, booktabs, listings, fira, firamath |103| latexmk, biber | from the TeX distribution | |104| Poppler | `pdftoppm`, `pdfinfo`, `pdffonts`, `pdftotext`, `pdftocairo` | previews and PDF checks |105| Python | 3.14 locally; labs are written for 3.10+ | `requirements-dev.txt`: PyYAML, pytest, Pillow (pinned) |106| make, git | system | on Windows without make, call `python tools/…` directly |107108CI (`.github/workflows/`): `quality-gates` (no TeX needed), `labs-test` (Linux, macOS, Windows × Python 3.10 and 3.12), `latex-build` (TeX Live container). **CI has not yet run**: the repository has no remote. The workflows are scaffolding until the first push.109110## Extending111112- New session: follow `CONTRIBUTING.md`; copy the structure of `sessions/S01-what-is-an-llm/`.113- New reusable figure primitive: add a style or pic to `latex/tikz-library/`, document it in `docs/visual-design-system.md`, add it to the icon sheet if it is an icon.114- New validator rule: add it to the relevant `tools/validate_*.py`, with a test in `tests/`.115- Translation (en-CA): learner-facing strings are isolated in `.tex` section files, YAML and Markdown; code, figure geometry and tooling are language-neutral. See `docs/accessibility.md`.116