Top-level merge-readiness workflow before asking Jörn about integration to main; subagents use assigned parts only as readiness checks and do not decide merge status or approval.
Run all phases in order before telling Jörn work is ready. Every phase runs on every branch — do not skip phases because "no changes in this area." Fix failures before proceeding to the next phase.
Run all of these. If a command fails, fix the issue and rerun before proceeding.
cd library/ && cargo test --release --lib
cd library/ && cargo clippy --lib -- -D warnings
cargo build --workspace --release
cd thesis/ && latexmk && ./check-build.sh
cd formal/library/ && latexmk
List all experiment main.rs files on this branch. For each, compile and run with the fewest polytopes the binary accepts (typically 1). If the binary takes no dataset argument, run --help or the default invocation. Goal: catch panics and import errors early. The polytope database caches results, so hot runs are fast.
No experiment main.rs files on the branch → nothing to do (empty set, not a skip).
For experiments with committed data (.jsonl, .csv), compare code and data commit dates:
git log -1 --format='%H %ci' -- experiments/<topic>/<experiment>/main.rs
git log -1 --format='%H %ci' -- experiments/<topic>/<experiment>/*.jsonl
If code is newer than data, regenerate on this branch.
Use the reviewer subagent plus $review. Launch separate reviewer instances for independent review surfaces, not separate agent definitions for every file type.
Default review surfaces:
| Surface | Scope | Skills / review references |
|---|---|---|
| Rust | Changed .rs files | $rust-conventions, review/references/rust.md |
| Formal math | Changed formal/**/*.tex files and Rust-linked labels | $formal-math-conventions, review/references/formal-math.md |
| Claims | Changed result summaries, thesis text, captions, formal commentary | review/references/claims.md |
| Thesis | Changed thesis/**/*.tex files | $thesis-tex-conventions, review/references/thesis.md |
| Python | Changed .py files | $python-conventions, review/references/python.md |
| Figures | Changed analyze.py, .png, or generated figure/table .tex files | review/references/figures.md |
If a surface has no files in scope, record "no files in scope" in the local notes. Do not launch an empty reviewer solely to prove the absence.
Before including any finding in the report to Jörn, read the file at the location the subagent references and confirm the finding matches what the code or text actually says.
Verify with priority:
formal/main.tex or formal/library/main.tex).TASKS.md, RESULTS.md, or the relevant research note for a known gap before treating it as newly discovered.A verification subagent can cross-check the combined findings when the task has high blast radius or the first reviewer reports subtle findings.
The Phase 8 report contains only verified findings, not the review/cross-check process.
main. Explicit instructions from the task prompt were followed (branch naming, scope restrictions, etc.).If experiment binaries were created or substantially modified, and Phase 4 review found issues that were fixed, run again with representative input to confirm fixes. Report results.
This phase is optional. Run it when experiment binaries were created or substantially modified in this branch.
Structure:
% [TODO: JÖRN items, things only Jörn can verifyhandoffs/<name>.mdWhen resolving conflicts during integration, choose the content that is true for the current repository state and project conventions. Do not use timestamp, branch side, author, or apparent task ownership as a shortcut for deciding which side wins.
For each conflicted hunk, identify the claim or behavior each side represents, check the surrounding files or commands when needed, then keep or combine the parts that preserve current mathematical statements, live paths, task status, and build behavior. If neither side is clearly correct, stop and ask Jörn with the concrete hunk and the missing decision.