evm-asm: Instructions file for Codex

AGENTS.md

evm-asm AGENTS.md is an instructions file for Codex, OpenCode from Verified-zkEVM/evm-asm. It costs 12,487 tokens per session, scanned A, original, MIT.

An instruction guide for AI agents working on EvmAsm, a formally verified RISC-V macro assembler written in Lean 4. The project produces a guest program that checks Ethereum execution data inside the ZisK zero-knowledge virtual machine.

In plain words
What is it for?
Use it to orient an agent before modifying EvmAsm, running builds, handling cached artifacts, or working on proofs for the stateless Ethereum guest.
Why use it?
It explains the project structure, build rules, and boundary between verified proof code and generated code. This helps agents work in the right files without breaking the layering rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md.

This is Verified-zkEVM/evm-asm's own configuration. It tells Codex and OpenCode how to work on evm-asm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything evm-asm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Verified-zkEVM/evm-asm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Verified-zkEVM/evm-asm/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Verified-zkEVM/evm-asm

Made for: Codex, OpenCode.

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 evm-asm AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/verified-zkevm/evm-asm/agents-md.svg)](https://agentmods.dev/instructions/verified-zkevm/evm-asm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/verified-zkevm/evm-asm/agents-md"><img src="https://agentmods.dev/badge/instructions/verified-zkevm/evm-asm/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 12,487 This file is loaded in full into every session.
When invoked 12,487 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.12487 $0.12487
Opus 5 $0.06243 $0.06243
Sonnet 5 $0.02497 $0.02497
Haiku 4.5 $0.01249 $0.01249

Measured 3d ago against content hash 751f3b54a174, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

evm-asm AGENTS.md 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 3d 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.

AGENTS.md · 603 lines

How it starts

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

AI Agent Guide for EvmAsm

Guidance for AI agents working on the EvmAsm project. This page is the compact router: non-negotiable rules + where to find everything else. Deep material is in docs/agents/ — load a deep page only when its trigger applies.

What this project is (and where it's going)

EvmAsm is a verified macro assembler for RISC-V in Lean 4 (in the lineage of "Coq: The world's best macro assembler?", Kennedy et al., PPDP 2013), applied to one goal: a formally verified zkEVM stateless guest. The guest (stateless_guest, run under the ZisK zkVM / ziskemu) validates an Ethereum execution payload against a witness; the north-star theorem is run_stateless_guest_spec (EvmAsm/Stateless/EntrySpec.lean) — the emitted guest's output is correct per the SpecRef port of execution-specs' run_stateless_guest.

Two layers, with a CI-enforced boundary (check-layering.sh):

  • The verified core (EvmAsm/ except Codegen//Tests//Examples/): machine model, separation logic, proofs, the executable spec ports. The core must NEVER import Codegen.
  • EvmAsm/Codegen/: the unverified-but-emitted guest (asm strings, emission, region maps, probes) that the verification is progressively replacing routine-by-routine. Verified ↔ emitted correspondence is tied by byte-identity _eq_prog drift guards or full re-emit gates (EEST A/B) — see docs/agents/verified-replacement-strategy.md.

The center of gravity is the evm-asm-4ch8f epic ("replace every guest routine with a verified triple"). The per-opcode Evm64 track that built this substrate is largely complete (52 opcodes, kernel-checked registry in EvmAsm/Progress.lean); most new work is porting guest routines, in callee-first order, against the separation-logic state-assertion vocabulary.

Start here

  1. What to work on: the in-repo sources are PLAN.md (roadmap; see CLAUDE.md for its maintenance protocol) and docs/agents/top-theorem-ledger.md (what remains for the north star). Work items are coordinated in an external issue tracker ("beads", ids like evm-asm-4ch8f.75.1) that most agents do NOT have access to — treat bead ids appearing in docs/PRs as opaque work-item references; if your session does have the tracker, use it, otherwise your task assignment supersedes.
  2. Starting any 4ch8f bead → docs/agents/roadmap-4ch8f.md (layer DAG, pick-next rules, recipe table).
  3. Verifying one routine → docs/agents/port-playbook.md (mechanics) + docs/agents/verified-replacement-strategy.md (what to prove, spec shape, what to do when a callee doesn't expose enough); sp-frame routines (stack frame + callee-saved regs, loops, cross-calls) → docs/porting-sp-frame-routines.md (FramePort tactics, tiered recipe).
  4. What remains for the north star → docs/agents/top-theorem-ledger.md.
  5. Reviewing a PR → docs/agents/review-playbook.md.
  6. Live progress cockpit (GitHub Pages) → https://verified-zkevm.github.io/evm-asm/ (docs/index.html). Do not hand-edit counts into the HTML; there are none. Merge to main republishes. If you changed a Progress registry, regenerate DRIFT.md only (scripts/drift-report.sh --write).

Read the full file on GitHub · 603 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. 3d ago Changed · +5 lines · +81 tokens per session 751f3b54a174
  2. 7d ago First seen · 598 lines · 12,406 tokens per session scan A 6d84eaac7103

Subscribe to this mod's changes

evm-asm AGENTS.md is an instructions file published in the GitHub repository Verified-zkEVM/evm-asm (55 stars, last pushed 2d ago), licensed MIT. It adds 12,487 tokens to every session, about $0.0624 per session on Opus 5. 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens