Turn a paper or your notes into a Lean 4 formalization you can check.
A plugin for your coding assistant: Claude Code, Muse Code or Codex.
What you get · Installation · Quick start · Example
Point AutoformBot at a paper, a book chapter or your notes. It plans the formalization as a blueprint (a wiki of linked
Markdown articles), has agents carry it out in Lean, and shows exactly what is proved. Agents keep the blueprint's
contract through the autoform CLI: only Lean-checked results count as proved, and progress, recomputed from the
dependency graph, never goes stale. See the example project.
flowchart LR
cli{{"<b>autoform</b> CLI<br>finds and claims work<br>searches · records facts"}}
plan -->|"write articles"| wiki[("<b>Blueprint wiki</b><br>plan and dependencies<br>plus what Lean checked")]
plan["<b>roadmap</b> agents<br>plan from paper or notes"] <--> cli <-->|"validates<br>recomputes progress"| wiki
prove["<b>formalize</b> agents<br>one result each"] <--> cli -->|"checks Lean names exist"| lean
prove -->|"write Lean"| lean[("<b>Lean project</b><br>definitions and proofs")]
cli -->|"render"| site(["<b>Blueprint site</b><br>book and dependency map"])
Requires Python 3.11 to 3.14, uv, Git, and Lean 4 v4.27.0 or newer with Lake.
Claude Code
claude plugin marketplace add facebookresearch/autoform-bot@v0.7.0
claude plugin install autoform@autoformMuse Code
muse plugins marketplace add autoform 'https://github.com/facebookresearch/autoform-bot.git#v0.7.0'
muse plugins install autoform@autoformCodex
codex plugin marketplace add facebookresearch/autoform-bot --ref v0.7.0
codex plugin add autoform@autoformThese commands install release 0.7.0. Then start a new session in your project, or anywhere for a new project.
Other install options
- On Claude Code before 2.1.71, run
claude plugin marketplace add 'facebookresearch/autoform-bot#v0.7.0'instead. - To follow
main, drop the@v0.7.0or#v0.7.0suffix, and give Codex--ref main. You can then run the unattended work loop. - To move from
mainor an earlier release, remove theautoformmarketplace, then run the commands above. Claude Code:claude plugin marketplace remove autoform. Codex:codex plugin marketplace remove autoform. Muse Code:muse plugins remove autoform, thenmuse plugins marketplace remove autoform.
Type these into your coding assistant; it runs AutoformBot's CLI for you.
| Step | Claude Code, Muse Code | Codex | What it does |
|---|---|---|---|
| 1 | /autoform:setup |
$autoform:setup |
Set up the Lean project and blueprint |
| 2 | /autoform:roadmap |
$autoform:roadmap |
Plan from a paper or notes |
| 3 | /autoform:formalize |
$autoform:formalize |
Write Lean definitions and proofs |
| Any time | /autoform:human-review |
$autoform:human-review |
Review the roadmap, progress and statements |
| Any time | /autoform:agent-review |
$autoform:agent-review |
Request an independent AI review |
For example, invoke roadmap and ask: "Build a complete roadmap for Sections 2–4 of paper.pdf." Keep the source
in your project, or give a path the agent can read.
A formalize session works on ready results in parallel, one agent per result. In Codex, raise max_threads under
[agents] in ~/.codex/config.toml to allow more agents at once. Several sessions, on one machine or many, share a
project by claiming results on a claim board kept as Git refs on origin:
- Give each session its own clone of the project, with the same
originand the same branch (not agit worktree). - Tell each session that other sessions share the project, ask it to use claims, and let it push claims and verified
results to
origin. - Have each session release its claims when it stops: a claim blocks its articles until it is released.
For example, invoke formalize in each session and ask: "Formalize the results that are ready. Four other sessions
share this project; use claims, and push claims and verified results to origin."
For the unattended work loop, use To follow main under Installation or run
git clone --branch main https://github.com/facebookresearch/autoform-bot.git. From your Lean project clone (origin
on GitHub, or pass --repo OWNER/NAME), run uv run --project "<AUTOFORM_PLUGIN_ROOT>" autoform work run --loop.
<AUTOFORM_PLUGIN_ROOT> is the absolute path to the AutoformBot checkout or the installed plugin (ask your agent
for the autoform plugin's root, the directory holding pyproject.toml).
Each worker claims a ready task, has Claude Code or Codex formalize it, checks the result, opens a pull request from
your fork and follows its checks and reviews until a maintainer could merge it. --workers N runs several.
--budget or a STOP file stops them (the work loop).
Before adding a result, agents search the blueprint and every dependency that publishes a search index Autoform can verify, such as ATLAS.
Clone with git clone https://github.com/facebookresearch/autoform-bot.git, then follow
CONTRIBUTING.md. The blueprint format and CLI reference,
servers/README.md and the changelog cover the rest. MIT license.
Issues and ideas are welcome. After a setup, roadmap or formalize run, your agent may end its report with a link to a
draft issue about where AutoformBot got in its way; you decide whether to send it. AUTOFORM_DEBRIEF=0 turns this off.