sail-phase2-bootstrap

sail-phase2-bootstrap is an agent for Claude Code from Verified-zkEVM/evm-asm. It costs 0 tokens per session (2,520 once invoked), scanned A, original, MIT.

A migration plan for bringing a fixed, limited RV64IM Lean model into the project and removing its moving external dependency. Vendoring means keeping the model inside the project at a chosen version.

In plain words
What is it for?
Updating dependencies, rebuilding the EvmAsm component, and restoring the 51 proofs that RISC-V routines match their Sail definitions.
Why use it?
It makes builds reproducible and rechecks the existing equivalence proofs against the model the project will actually use.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/verified-zkevm/evm-asm/sail-phase2-bootstrap
Clone the repo
git clone --depth 1 https://github.com/Verified-zkEVM/evm-asm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sail-phase2-bootstrap

README.md
[![agentmods](https://agentmods.dev/badge/agents/verified-zkevm/evm-asm/sail-phase2-bootstrap.svg)](https://agentmods.dev/agents/verified-zkevm/evm-asm/sail-phase2-bootstrap)
Your own site
<a href="https://agentmods.dev/agents/verified-zkevm/evm-asm/sail-phase2-bootstrap"><img src="https://agentmods.dev/badge/agents/verified-zkevm/evm-asm/sail-phase2-bootstrap.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,520 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02520
Opus 5 $0.00000 $0.01260
Sonnet 5 $0.00000 $0.00504
Haiku 4.5 $0.00000 $0.00252

Measured 6d ago against content hash 25ad3df9cdfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sail-phase2-bootstrap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/sail-phase2-bootstrap.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sail-zkVM integration — Phase 2 bootstrap (foundation migration)

Historical bootstrap record. Current maintenance moved to Verified-zkEVM/riscv-zkvm.

For: the next session. Goal of P2: vendor the (now-proven) current-upstream scoped RV64IM Lean model into evm-asm, build it in-project, drop the moving dhsorens fork, and re-establish the 51 *_sail_equiv lemmas against it.

Status (2026-06-25): steps 1–4 DONE — the core P2 migration is complete and green. dhsorens is gone from lakefile.toml/lake-manifest.json; the project builds against the vendored model (require out from "vendor/sail-riscv-zkvm-lean"). Full lake build EvmAsm = 2984/2984, exit 0. All 51 *_sail_equiv lemmas green; axioms = {propext, Classical.choice, Quot.sound} only (no custom axioms, no sorryAx); no forbidden tactic in vendored or proof code. The LeanRV64D → Out rename was 100% mechanical — the feared bool_to_bit → bool_to_bits rename was a PHANTOM (both old and new model use bool_to_bit; the doc below had it backwards). Residual P2 items 5–7 (config revalidate, scoping write-up, pin gate) are tracked below and in docs/agents/sail-phase3-bootstrap.md; none block downstream proof work.

What proved out (the two real risks, both retired):

  • lean-sail v4 + mathlib-master coexist in the real evm-asm build (StateRel + 2984-job full build). This was the one unverified step-1 risk.
  • The 51 lemmas re-point with zero genuine logic renames — pure LeanRV64D → Out.

Read first: sail-import/PROVENANCE.toml [target] (the proven pins + vendor_path

  • model_sha256). Then scripts/regen-sail-model.sh (the validated regen recipe) and docs/agents/sail-regen-spike.md (the GO report) only if you need to regenerate.

Proven foundation (DONE — don't re-litigate)

  • Toolchain stack: Sail 0.20.2 (opam switch sail5, OCaml 5.4.1 — 4.14.2 stack-overflows, sail#1674) + sail-riscv release tag 2026-06-22-b5a2182 + external lean-sail v4 (79b4d08) on lean4 v4.30.0-rc1 (NO bump). z3 4.15.3 at the nix path in regen-sail-model.sh (machine-specific — de-nix before CI).
  • Generation works (step ✔): scripts/regen-sail-model.sh --run <dir> → 113 files, scoped main I_insts M_insts, decode bv_decide-free.
  • Matched pair builds (step ✔): that model + lean-sail v4 → lake build 84/84, exit 0.
  • VENDORED + re-proven from git (step 2, commit a2dedf448): vendor/sail-riscv-zkvm-lean/ (113 .lean, package out, lib Out). Its lakefile.toml git-pins lean-sail @ 79b4d08 (tag v4); lean-toolchain = v4.30.0-rc1. A clean lake build from the committed dir — fetching lean-sail fresh from the pinned rev — gives 84/84, exit 0. model_sha256 recorded in PROVENANCE. Package/lib names kept verbatim from the proven artifact (renaming the lib would rewrite every internal import Out.*).

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 130 lines · 0 tokens per session scan A 25ad3df9cdfd

Subscribe to this mod's changes

sail-phase2-bootstrap is an agent published in the GitHub repository Verified-zkEVM/evm-asm (55 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,520 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.