FL-Prover Orchestration Cookbook
Use this skill to run a Lean workspace without doing specialist work inside the
Orchestrator. It is not a fixed pipeline. There is no mandated
Formalizer → F-Reviewer → F-Generator → Integrator → Golfer → Regulator order:
dispatch whichever specialist owns the current blocker, in whatever order the
target demands, as often as it takes.
What is not negotiable is what may enter the master Lean development:
- it compiles (
lean.py check); - it is free of
sorry/admit(lean.py scan); - its axiom set is the accepted base and nothing more (
lean.py axioms); - its statement still says what the source reference says — the book, paper, or
user statement the target came from — and matches the guarded snapshot
(lean.py guard check).
Everything else in this cookbook is advice about how to get there efficiently.
Quick Dispatch
| Need | First reference |
|------|-----------------|
| Choose the next specialist | subagent-dispatch-cookbook.md |
| Run the merge gates | gates.md |
| Ledger commands and fields | task-ledger-format.md |
| Protect / verify a statement | statement-guard.md |
| Close a wave | wave-summary.md |
| Decide whether stopping is allowed | stop-conditions.md |
| Who may write what | ../../../prompts/references/workspace-and-ownership.md |
Specialist Summary
Blueprinter decomposes a hard target into a dependency-ordered helper-lemma plan;
Formalizer turns source statements into Lean declarations with sorry bodies;
F-Reviewer judges statement fidelity against the source before any proof effort;
F-Generator proves one assigned declaration inside an isolated scratchpad;
Integrator is the only agent that merges into the master development; Golfer
shortens an already-passing proof without changing its logic; Regulator audits a
finished wave for statement drift, duplicate definitions, and unexpected axioms;
Statement Read-back independently states what a Lean declaration literally
asserts without seeing the source intent or proof narrative.
State
Control-plane state lives under WORKSPACE/.claude/state/. If
proof_tasks.json is missing, only the Orchestrator initializes it:
uv run python cli_tools/control.py task init --workspace WORKSPACE --actor orchestrator
Create explicit task entries before dispatching, and record each dispatch's
outcome — a specialist cycle that leaves no ledger trace did not happen.
Maintain the typed obligation graph with cli_tools/dag.py: inspect state and
leaves, record node evidence with put, and render the current STATUS.md.
Before marking a node proved, dispatch statement-readback and record its result
with dag.py put --readback; repeat this whenever its statement changes.
Skills
| Skill | Description |
|-------|-------------|
| verification | The deterministic Lean gates: check, scan, axioms, guard |
| lean-search | Premise retrieval: leandex, loogle, leanfinder, leansearch, state, hammer |
| formalize | Informal mathematics → faithful Lean declarations |
| sorrifier | Isolate a failing proof step into a helper lemma |
| knowledge | KB-Manager tier: read the index, write Lean_* / Experience_* cards |
| memory-routing | Which memory tier a new fact or lesson belongs to |
| llm | External-LLM support: informal draft, discussion, cross-check, golf |
Environment variables
OPENROUTER_API_KEY— preferred for theexternal.pytoolsGEMINI_API_KEY/OPENAI_API_KEY— direct-API fallbacksLEANDEX_API_KEY— Leandex semantic searchLEAN_ELAN_HOME— only when elan does not live in~/.elan