10 Diagram Provenance¶
This directory holds the diagram masters: standalone HTML/SVG architecture artifacts. Each master is the single source for one diagram; the docs pipeline derives per-surface artifacts from it so all three documentation surfaces embed the same geometry.
10.1 Pipeline¶
Each diagram declared in docs/manifest.yaml (diagrams[].master → a file in this
directory) is rendered once into two artifacts by scripts/docs/render_diagrams.py and
scripts/docs/build_docs.py:
- SVG →
generated/site/assets/img/<id>.svg— embedded by the generated site. - PNG →
docs/diagrams/img/<id>.png(committed) — embedded by the in-repo Markdown and the generated wiki.
Because the same master feeds all three surfaces, diagrams never drift: updating a master and re-running the pipeline refreshes every surface.
10.2 Current Artifacts¶
ml-eng-lab-system.html— repository context and primary components (declared assystemin the manifest; embedded bydocs/architecture.md).ml-eng-lab-runtime-flow.html— local VS Code → Atlas JupyterHub as the default runtime, fallback entry paths, and task-local artifact behavior; embedded only indocs/architecture.mdand never used as a project-branding asset.ml-eng-lab-notebook-sequence.html— notebook execution from parameters through training, ranking, visualization, persistence, and verification.ml-eng-lab-docs-publishing.html— README, docs, MkDocs, GitHub Pages, wiki, and repository metadata surfaces.ml-eng-lab-docs-sync.html— the three-surface documentation sync pipeline (added with the docs-overhaul foundation).
10.3 Generation Contract¶
The checked-in HTML masters are the source of truth. Do not hand-edit generated geometry without updating this provenance note in the same change. When a diagram needs to change:
- Update the affected HTML master while preserving its standalone, deterministic SVG contract.
- Run
python -m scripts.docs.render_diagramsto refresh the committed PNG (docs/diagrams/img/<id>.png); the site SVG is refreshed by the nextbuild_docsrun. - Run
make docs-checkandmake docs-wikiso the repository, site, and wiki projections are regenerated and validated from the same commit. - Inspect the rendered diagram at normal browser zoom for overlapping labels, boxes, legends, or arrows before committing.
10.4 Review Rules¶
- Diagram content must describe current repository behavior, not aspirational design.
- Arrows and labels should remain readable on desktop and narrow screens.
- New architecture, runtime, notebook-flow, or documentation-publishing changes should update the matching master and add or refresh its manifest entry in the same pull request.
- A diagram referenced by the manifest must have its master present, or
scripts/docs/manifest.py:load_manifestandrender_diagrams.pywill fail.