This repository helps you turn an existing leanblueprint or TeX blueprint
project into a Verso-based blueprint site.
Use it when:
- you are starting a new blueprint port from scratch
- you already have an older port and want to bring it up to the current shared setup
The normal operating model is:
- a human sets up the repo with this harness
- the human uses Codex CLI to issue prompts and carry out the porting work
- Codex reads
verso-harness.toml,AGENTS.md, and the harness docs - Codex should use the harness-provided checking tools for fidelity, grounding, graph shape, and port status
Add the shared harness to your repo:
git submodule add git@github.com:ejgallego/leanblueprint-to-verso.git tools/verso-harnessIf you are starting a brand-new port from an empty directory, the first command you should run is:
python3 tools/verso-harness/scripts/start_new_port.py \
--project-root . \
--package-name <BlueprintPackage> \
--title "<Project Title>" \
--formalization-name <FormalizationName> \
--formalization-remote <upstream-formalization-git-url> \
--formalization-path <FormalizationName> \
--tex-source-glob "<relative-tex-source-path-or-glob>"After that:
- review
verso-harness.toml - add your first real chapter file under
chapter_root - set
lt.default_chapters - review
harness.native_warningsandharness.strict_external_code - run
python3 tools/verso-harness/scripts/check_harness.py --project-root . - copy
tools/verso-harness/snippets/AGENTS.host.mdintoAGENTS.md - choose the first direct-port chapter from
lt.default_chapters - open Codex CLI and issue the first porting prompt for one coherent section of that chapter
The startup flow intentionally does not generate synthetic chapter prose.
lt.default_chapters is only for real source-backed direct-port chapters.
- The upstream math project decides the Lean toolchain.
- Every managed repo must have a root
verso-harness.tomlfile. - New ports use one standard layout; do not invent a new one.
If you already have an older port, use the retrofit path instead of the empty-directory start path:
Start any maintenance pass with the repo-level status check:
python3 tools/verso-harness/scripts/status_harness.py --project-root .Then check that the repo still matches the expected shared setup:
python3 tools/verso-harness/scripts/check_harness.py --project-root .Run the main direct-port chapter audit commands:
python3 tools/verso-harness/scripts/check_lt_source_pairs.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/check_lt_similarity.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/check_blueprint_node_kinds.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/check_source_label_grounding.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/check_verso_math_delimiters.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/lt_audit.py --project-root . path/to/Chapter.lean
python3 tools/verso-harness/scripts/lt_audit.py --project-root . --native-warnings path/to/Chapter.lean
python3 tools/verso-harness/scripts/lt_audit.py --project-root . --native-warnings --native-warnings-scope all path/to/Chapter.lean
python3 tools/verso-harness/scripts/status_completion.py --project-root . --buildStart a new port from an empty directory:
Short adoption checklist:
Detailed porting workflow:
- The shared setup may change over time because it is used by more than one
project. If
tools/verso-harnesschanges unexpectedly, inspect the helper diff and reruncheck_harness.py. - Generated
.github/workflows/blueprint.ymlfiles are thin callers into the reusable Pages workflow shipped byverso-blueprintand pinned to the sameVersoBlueprintref used inlakefile.lean. - The helper chooses the matching
VersoBlueprintbranch from the Lean toolchain used by the upstream math project. - Generated consumers keep the version-appropriate Verso math-lint option
enabled and disable the noisy
VersoManualinline-code line-length warning via the version-appropriate warn-line-length option set to0. - Generated consumers also set
the version-appropriate strict-resolve option from the default harness
warning policy, and
check_harness.pyverifies thatlakefile.leanstays aligned with the declaredverso-harness.tomlsettings. - Verso inline math opens with
$`` and closes with the final backtick alone. The malformed TeX-like pattern$...$ ` must not be introduced while porting. - Generated
README.mdfiles are starting points only; after bootstrap they are project-owned.