Skip to the content.

Notes for AI agents: working on the roadmap

This file helps an AI agent (or a human) get up to speed on the repository quickly: how the map is produced, how to change it safely, and the conventions to keep.

This is not a changelog — for what changed and when, see the git history.

IMPORTANT: the maps are GENERATED, not hand-edited. Each <Language>/Graph/roadmap.drawio.svg is build output of the mapgen pipeline. Do not edit those files (or their embedded draw.io XML) directly — edit the source in tools/mapgen/roadmap/ and rebuild. CI (mapcheck) fails if a committed map no longer matches the source, so hand-edits will not pass.

Repository conventions

How the map is produced

tools/mapgen/roadmap/structure.dsl  +  <lang>.tsv   ──►  build.py  ──►  <lang>.drawio.svg
        (one language-neutral source)   (per-lang text)  (layout engine)  (copied to <Language>/Graph/)

Editing the map

  1. Edit the source in tools/mapgen/roadmap/:
    • structure / grade / stage / hint placementstructure.dsl
    • text (a label, a hint’s wording, the date, a legend caption) → the relevant <lang>.tsv row(s). A structural add needs a new row in all four tsvs.
  2. First time on a machine: python tools/mapgen/setup.py --venv (creates a virtualenv, installs Pillow, and reports how to install the draw.io desktop app if it is missing).
  3. Rebuild, update all four live maps, and validate — one command from the repo root:
    python tools/mapgen/build.py --dir tools/mapgen/roadmap --deploy --check
    

    --deploy copies each built map over its <Language>/Graph/roadmap.drawio.svg; --check runs mapcheck afterwards (a hard error exits non-zero). Dependencies are always verified first — Pillow, a metrics font, the draw.io CLI, the source files — and every problem is reported together with install hints, so a missing one, or a virtualenv you forgot to activate, fails immediately rather than half-way through. --drawio-cli / --font override autodetection.

  4. Commit the changed source and the regenerated maps together.

Reverse-engineering an existing map back into the DSL, and onboarding a new language, are one-off jobs handled by tools/mapgen/bootstrap/ — not part of the normal edit loop.

Conventions the generator follows (and you should preserve in the DSL)

Validation — tools/mapcheck

check.py runs in CI on every PR touching a map (.github/workflows/map-check.yml) and scans all <Language>/Graph/roadmap.drawio.svg. Hard errors (fail CI): box-fits-text (Latin), overlaps, and map-vs-DSL (a committed map that no longer matches tools/mapgen/roadmap — ids, grades, <lang>.tsv text, or a missing translation). Warnings: cross-language drift and a stale date. See tools/mapcheck/README.md.

Open questions