Add public agent-facing docs manifests, sync gates, and Pages bundle

Add deterministic, count-free machine-readable documentation artifacts,
curated high-signal guides, hidden site discovery, and blocking CI sync
and hygiene checks so external developers and coding agents can query
Anneal's live capabilities without drifting prose or merge-queue churn.

Summary of changes:
- Plane 1 sync & hygiene gates (`ci/sync_public_docs.py`,
  `ci/check_skills.py`, `ci/check_docs_hygiene.py`,
  `ci/build_site_agent_bundle.py`, `site/platform_support.toml`,
  `site/llms_manifest.toml`, `ci/run_anneal_check.sh`,
  `ci/check_pr_hygiene.py`, `AGENTS.md`):
  - Extract count-free `docs/generated/capabilities.json` (pinned
    toolchains, 3-axis platform support cross-checked against
    `ci/checks.toml`, Receipt v3 schema invariants, strict
    comment-stripping `Terminators.lean` `CoreCallOp` / `SysrootNumKind`
    catalogs, and bundled `Anneal.*` modules) and absolute-URL
    `site/static/llms.txt`.
  - Add feature-annotated `trusted/cargo-anneal/assets/cli-schema.json`
    verified inside `trusted/cargo-anneal/src/cli.rs` under both default
    (`setup`) and `--no-default-features` builds.
  - Restore `ci/check_skills.py` (byte parity, installed-skill
    self-containment, `.agents/skills.json` validation, and Pass-1
    library-family checks without volatile module-list rewrites in
    `skills/`) and add `ci/check_docs_hygiene.py` (relative links,
    spinout checks, internal-identifier firewall, and positioning
    lexicon).
  - Add content-aware `Doc-impact:` tripwire and `SIZE_GENERATED_PATHS`
    entries to `ci/check_pr_hygiene.py`.
- Plane 2 context guides & spinout cleanup (`docs/guide/comparisons.md`,
  `docs/guide/faq.md`, `docs/roadmap.md`,
  `docs/contributing/release.md`, `docs/alpha.md`,
  `skills/anneal-docs/SKILL.md`, `skills/*`, `.agents/skills.json`,
  `ci/render_perf_dashboard.py`):
  - Add budget-capped peer comparisons, tacit-trap FAQ with managed
    exit-code/receipt blocks, horizon-badged roadmap, and read-only
    `anneal-docs` skill with untrusted-data framing.
  - Split `## Cut the release` out of `docs/alpha.md` into
    `docs/contributing/release.md`, resolve the `docs/alpha.md`
    returning-calls contradiction, and clean up stale `google/zerocopy`
    operational pointers and checkout-only paths in bundled skills.
- Plane 3 Pages bundle & hidden discovery (`site/templates/index.html`,
  `site/templates/robots.txt`, `.github/workflows/docs.yml`):
  - Add `<link rel="alternate" type="text/plain" ...>` in `<head>` with
    zero visible UI chrome, preserve `Sitemap:` via templated
    `site/templates/robots.txt`, refresh bookplate copy, and extend
    `docs.yml` to publish `/llms.txt`, `/llms-full.txt` (<= 200 KiB),
    `/capabilities.json`, `/cli-schema.json`, and untrusted-data-framed
    `/recent-changes.{json,md}` alongside `/bench/`.

Flagship front-door signposts (`README.md` and
`docs/how-anneal-earns-trust.md`) are intentionally staged in a separate
Draft PR for independent human review.

Agent-authored-by: AI agent acting on joshlf's behalf
39 files changed
tree: c0df8071e77a59f97112c734db0d26bf013c9f71
  1. .agents/
  2. .config/
  3. .gemini/
  4. .github/
  5. ci/
  6. correspondence/
  7. crates/
  8. docs/
  9. site/
  10. skills/
  11. tests/
  12. theory/
  13. tools/
  14. trusted/
  15. vendor/
  16. .dockerignore
  17. .gitignore
  18. AGENTS.md
  19. Cargo.lock
  20. Cargo.toml
  21. CLAUDE.md
  22. CODE_OF_CONDUCT.md
  23. CONTRIBUTING.md
  24. flake.lock
  25. flake.nix
  26. LICENSE-APACHE
  27. LICENSE-BSD
  28. LICENSE-MIT
  29. META_PRINCIPLES.md
  30. PRINCIPLES.md
  31. README.md
  32. rustfmt.toml
  33. SECURITY.md
  34. THIRD_PARTY_NOTICES.md
  35. THREAT_MODEL.md
README.md

Anneal is an experimental formal verifier for Rust. Where rustc proves that safe Rust is memory safe, Anneal aims to let you prove that unsafe Rust is free of undefined behavior and obeys explicit contracts.

[!WARNING] Alpha software: Anneal is under active development and has not yet undergone an independent security audit. Today's default profile verifies a pointer-free scalar subset of Rust on x86-64 Linux; an experimental second profile adds borrowed slices and raw pointers without a pointer aliasing model. Automated reporting of the complete human review surface is still in progress. Do not rely on alpha runs as a production soundness guarantee, and expect breaking changes. See the alpha guide and threat model.

Why safe Rust is not enough for unsafe code

Rust promises that all safe Rust code is memory safe. It does this by encoding the requirements for memory safety in the type system, ensuring that if a program type checks, then it is memory safe.[^1] The same is not true of unsafe Rust code.

[^1]: Barring compiler and platform bugs, which do exist.

One way to understand this distinction is that a safe Rust function must be memory safe no matter what value is passed in. Consider usize::strict_div:

impl usize {
    /// # Panics
    ///
    /// This function will panic if `rhs` is zero.
    pub fn strict_div(self, rhs: usize) -> usize;
}

A safe implementation of strict_div is forced to handle all possible values of self and rhs, including rhs == 0. It can choose to return an arbitrary usize or, as it does in practice, panic—but it cannot exhibit a memory safety bug, because rustc will reject any safe implementation that could.

By contrast, consider the unsafe usize::unchecked_div_exact:

impl usize {
    /// # Safety
    ///
    /// This results in undefined behavior when `rhs == 0` or `self % rhs != 0`.
    pub unsafe fn unchecked_div_exact(self, rhs: usize) -> usize;
}

The Rust type system has no way to express and enforce “a pair of usizes such that rhs != 0 and self % rhs == 0”. The type signature of unchecked_div_exact is therefore too permissive. While the type system still rules out some invalid inputs (for example, -1), other illegal values compile cleanly and trigger undefined behavior at runtime:

let res: usize = unsafe { 1usize.unchecked_div_exact(0) };

In this view, unsafe Rust differs from safe Rust in that some type-safe values are still illegal, while in safe Rust all type-safe values are legal (where “illegal” means “will trigger undefined behavior”).

Anneal‘s goal is to extend Rust’s compile-time promise to unsafe code—and beyond memory safety to developer-defined contracts—by making those contracts machine-checked alongside cargo check and in CI.

Rust (rustc)Anneal (target model; scalar alpha today)
Commandcargo checkcargo anneal verify
Contract surfaceRust typesRust types + formal specifications[^2]
GuaranteeSafe code is memory safeVerified code is UB-free and obeys its stated specifications[^3]
Boundaryunsafe code is uncheckedCode outside the Rust Abstract Machine (FFI, inline asm) is unchecked and must be axiomatized; alpha refuses unsupported constructs rather than failing open
Human review surfaceAll unsafe blocks and their safety invariantsStated specifications + TCB audit log (not proofs or verified implementation bodies)

[^2]: In the current alpha, specifications live out-of-line in Lean modules (with an untrusted Rust-syntax lowering tool in tools/anneal-spec/); first-class inline Rust specification syntax is roadmap work. [^3]: Anneal's conditional promise: if the code in the TCB audit log is correct, its assumptions are valid, and Anneal emits no errors in an uncompromised environment, then the verified code is UB-free and satisfies its stated specifications. See Principles and the threat model.

How Anneal earns your trust

Most of Anneal is generated by AI agents, which begs the question: why should you trust Anneal at all?

Our answer is this: Anneal's architecture, development infrastructure, and team practices follow three core principles:

  1. Keep the TCB simple, small, and auditable: Anneal separates finding a proof from checking it. Every verification obligation is stated in Lean 4, a proof assistant whose small typechecking kernel checks proof terms from first principles. Untrusted tactics, proof libraries, and AI-written proof scripts do the heavy lifting, while Anneal enforces strict isolation so a buggy or adversarial proof can make verification fail, but cannot smuggle a false theorem past the kernel. That confines soundness-critical code to a small Trusted Computing Base (TCB) under trusted/ with four components:

    • Compiler-to-MIR capture: translates rustc's Mid-level Intermediate Representation (MIR) faithfully and records the exact compilation flags, target layout, and scope.
    • Boundary and specification auditing: ensures untrusted Lean code cannot exploit macros, elaborators, namespaces, or compiler overrides to bypass the kernel.
    • Orchestration and receipt integrity: binds source inputs, compiler configuration, specifications, and verification results into an auditable receipt so human review can stay bounded to stated specifications and the TCB audit log (automated complete review-surface reporting is still in progress).
    • Mechanized Rust MIR semantics: defines a semantics for MIR syntax that has been mechanically lowered to Lean data types.
  2. Ground semantics in existing semantic authorities: Rather than judging our Rust MIR model solely by tests or definitions we wrote ourselves, we anchor it against established compilers, interpreters, and formal specifications:

    • Formal refinement proofs against reference semantics (lean-miri and MiniRust): in blocking CI on main, Anneal proves kernel-checked refinement and fault-equivalence theorems showing that its MIR semantics soundly abstract a pinned lean-miri reference model, complemented by correspondence proofs anchored to a pinned MiniRust specification.[^4]
    • Differential testing and fuzzing against real rustc and Miri: we execute real and generated Rust programs through rustc, Miri, and Anneal's MIR semantics to surface semantic divergences that no internal proof can catch.[^5]
  3. Continuously check meaningfulness: No model or boundary check is perfect, so we deploy continuous testing and structural defenses to surface bugs quickly and rule out whole classes of mistakes by construction:

    • Mutation testing and adversarial red-teaming: we deliberately mutate trusted/ guards, semantic rules, and real zerocopy verification targets, and run red-team campaigns against the capture, sandbox, and audit boundaries to verify that broken code and hostile inputs fail closed rather than silently passing.
    • Structural containment and non-oracle invariants: we enforce dependency boundaries that align with our model of the TCB, isolate Lean elaboration inside OS sandboxes, enforce default-deny syntactic pre-flight checks before Lean elaboration, check proofs across independent kernels, and run structural lints to eliminate classes of bugs by construction.[^6]

[^4]: On main today, universal lean-miri refinement and fault-equivalence proofs cover the default pointer-free scalar profile (Profile v1). The experimental Profile v2 semantics (adding borrowed slices, arrays, and raw pointers without a pointer aliasing model) are not yet universally bridged; extending correspondence to Profile v2—starting with concrete canary proofs and progressing toward per-primitive lemmas—is active work. [^5]: Today‘s differential harnesses (tests/differential and tests/itree_diff) compare scalar return values, observable call and branch traces, panics and aborts, divergence, and coarse UB/fault verdicts across rustc (-O0 and -O2), Miri (with Tree Borrows), and Anneal’s MIR semantics. Ongoing hardening extends these comparators to verify full provenance-aware caller memory images and exact fault classifications. [^6]: In blocking CI on main today, anneal-audit enforces the Cargo workspace zone boundary (trusted/ cannot depend on tests/ or tools/), runs default-deny syntactic pre-flight checks, compiles and replays proofs through Lean's standalone kernel, and enforces repository hygiene and pin lints, while cargo-anneal sandboxes target Lean elaboration on Linux (bwrap or Landlock+seccomp). Out-of-process proof replay across independent external kernels (nanoda and con-ron) is implemented on main for newer Lean toolchains (v4.35.0+, opt-in via --allow-unpinned-lean), and additional structural lints—such as exhaustive wildcard-match enforcement across trusted/ and split spec/model cone hashing—are in progress.

For the full explanation of our assurance model—what does not need to be trusted, where trust lives, and how we ground and test our trusted components—read How Anneal Earns Your Trust.

Trying the alpha and documentation map

You can find installation commands, local toolchain setup, and cargo anneal CLI usage alongside CI-tested workflows in the alpha guide. Anneal's verification core also supports out-of-tree specification and proof modules so downstream projects can add custom models and witness checkers without expanding the trusted computing base.

Agent skills

Run cargo anneal skill to print the bundled cargo-anneal SKILL.md without setting up the Anneal toolchain, or cargo anneal skill list to list all bundled skills (including spec-authoring and proof-scaling). To install the skill into a project repository with GitHub CLI, set ANNEAL_REV to your release tag or source commit:

gh skill install google/anneal \
  trusted/cargo-anneal/skills/cargo-anneal/SKILL.md \
  --agent codex --scope project --pin "${ANNEAL_REV:?set the source revision}"

See the Anneal skills index for the companion spec-authoring and proof-scaling skills.

What to read next

DocumentWhat it covers
How Anneal Earns Your TrustComplete account of our assurance model, the four trusted/ components, and external grounding vs. internal checks.
Project PrinciplesAnneal's mission, conditional correctness promise, and design priorities.
Threat ModelAdversarial assumptions, bounded two-surface human review, and explicit assumptions vs. total defenses.
Alpha GuideSupported vs. refused Rust constructs (Profile v1 and experimental Profile v2), installation, CLI usage, and receipt inspection.
Out-of-Tree ExtensibilityAdding project-specific specification models, witness checkers, and rewrite rules outside trusted/.
Contributor & Architecture DocsBuilding from source, repository layout, CI checks, and deep architecture references.

Acknowledgments

Anneal builds on decades of work and research in formal verification and the study of programming languages, among other fields. It is only possible thanks to the work of countless researchers and software engineers. Some of the most significant influences are listed here, but this list is far from exhaustive.

  • Son Ho and Jonathan Protzenko‘s Aeneas inspired PureLift’s translation of Rust borrows and updates into pure computations. Early Anneal used Aeneas to translate Rust into Lean and Charon to extract Rust programs for analysis. Charon is by Son Ho, Guillaume Boisseau, Lucas Franceschino, Yoann Prak, Aymeric Fromherz, and Jonathan Protzenko. Son Ho, Aymeric Fromherz, and Jonathan Protzenko‘s work on symbolic borrow checking informed Anneal’s study of the semantics behind this translation. Johannes Hostert's Aeneas layout model informed SpatialMem's byte-level aggregate codecs.
  • PureLift uses lawful bidirectional lenses. J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, and Alan Schmitt developed these foundations in Combinators for Bidirectional Tree Transformations.
  • Anneal‘s tristate-number (tnum) bitwise and carry-propagation transfer functions adapt the tnum abstract domain formalized by Harishankar Vishwanathan, Matan Shachnai, Srinivas Narayana, and Santosh Nagarakatte in Sound, Precise, and Fast Abstract Interpretation with Tristate Numbers and used in the Linux kernel’s eBPF verifier. Anneal‘s reduced-product MIR abstract-interpretation checker (Anneal.AiPcc) combines tnum with wrapped intervals by Jorge A. Navas, Peter Schachte, Harald Søndergaard, and Peter J. Stuckey, arithmetical congruences by Philippe Granger, and single-pass cutpoint post-fixpoint checking following François Bourdoncle’s weak topological orderings.
  • Anneal‘s $\mathbb{F}_2$-linear and $\mathbb{F}_2$-bilinear SIMD and carryless-multiply certificate evaluators draw on Shay Gueron and Michael E. Kounavis’s carryless polynomial multiplication and reduction and Wojciech Muła, Nathan Kurz, and Daniel Lemire's split-nibble SIMD table lookups.
  • Anneal‘s proof-lifting experiments drew on Magnus O. Myreen, Michael J. C. Gordon, and Konrad Slind’s decompilation into logic to reason about one basic block at a time. Tree Borrows by Neven Villani, Johannes Hostert, Derek Dreyer, and Ralf Jung guided experiments on how to account for mutable borrow permissions. Gillian-Rust by Sacha-Élie Ayoun, Xavier Denis, Petar Maksimović, and Philippa Gardner, CN by Christopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian, Peter Sewell, and Neel Krishnaswami, and Fulminate by Rini Banerjee, Kayvan Memarian, Dhruv Makwana, Christopher Pulte, Neel Krishnaswami, and Peter Sewell informed SpatialMem's hybrid pure-and-byte pinning and padding representation.
  • Anneal‘s MIR correspondence proofs use a pinned, patched copy of lean-miri. Yuichi Nishiwaki’s port builds on the Rust compiler‘s MIR interpreter and the work of the Miri developers and contributors. Ralf Jung’s MiniRust and the Rust Unsafe Code Guidelines contributors' discussion of moved values helped inform Anneal‘s treatment of moves, and a pinned snapshot of the MiniRust specification (vendor/minirust/) anchors Anneal’s secondary operational correspondence proofs (Anneal.MiniRustProof). Xavier Leroy and the CompCert contributors' work on simulation proofs provided a comparison for how Anneal relates its model to its reference semantics.
  • Lean 4, by Leonardo de Moura, Sebastian Ullrich, and the Lean contributors, checks Anneal‘s proofs. Lean’s declaration replay, environment importer, compiler-attribute handling, and kernel reduction behavior guided Anneal‘s auditor and PureLift’s combinators.
  • Anneal‘s elaborator sandbox builds on Bubblewrap, by Alexander Larsson, Colin Walters, and the Bubblewrap contributors, on Linux’s Landlock security module, by Mickaël Salaün and the Linux kernel contributors, and on Linux's seccomp-BPF syscall filter, by Will Drewry and the Linux kernel contributors.
  • The Rust contributors' compiler source (including rustc_const_eval and a padding-clearing issue) and Rust Reference guided Anneal‘s MIR capture and model of Rust behavior. The earlier memory model also drew on the standard library documentation. The LLVM contributors’ language reference guided Anneal‘s treatment of Rust’s linkage attributes.
  • Early design work drew on research into security risks in Rust by Xiaoye Zheng, Zhiyuan Wan, Yun Zhang, Rui Chang, and David Lo. Lars Bergstrom‘s Rust Nation UK talk, Jeff Vander Stoep’s Android delivery data, and Hongliang Tian's account of the Asterinas kernel gave the early design concrete examples of Rust development and the work involved in writing unsafe code.
  • The Fuchsia and Starnix eBPF contributors' production Rust crates and build integration shaped Anneal's out-of-tree verification interface and end-to-end verification tests.
  • Google DeepMind‘s code-verification (ProofLib, Apache-2.0) inspired Anneal’s balanced Braun-tree separation-logic AC reflection (Anneal.Core.SepPCM) and sparse linear bitvector offset normalizer (Anneal.PureLift.BvLin).
  • Michael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian, Derek Dreyer, and Deepak Garg's RefinedC and its Lithium separation-logic engine inspired Anneal.SepAC.RangeSpan's deterministic non-backtracking PTree.diffWith framing rules.

Security

If you discover a security vulnerability in Anneal, please follow the reporting instructions in SECURITY.md.

Google's Open Source Software Vulnerability Rewards Program (OSS VRP) rules and eligibility criteria are described at https://bughunters.google.com/about/rules/open-source-software-vulnerability-reward-program-rules.

License

Anneal is distributed under the terms of the 2-Clause BSD license (LICENSE-BSD), the Apache License, Version 2.0 (LICENSE-APACHE), or the MIT license (LICENSE-MIT), at your option (BSD-2-Clause OR Apache-2.0 OR MIT).

All contributions to Anneal are governed by Google's Contributor License Agreement; see CONTRIBUTING.md.

Third-party files under vendor/lean-miri/ retain their upstream Apache-2.0 OR MIT licenses; see THIRD_PARTY_NOTICES.md.