wp-framework

A proof framework for Rv64 programs that works backwards from a desired final result to calculate the conditions needed before execution. It uses certificates to prove that code reaches its endpoint correctly.

In plain words
What is it for?
Use it to write proofs for Rv64 assembly programs, describe their control-flow shape, and check that they establish a required final condition.
Why use it?
It removes the need to manually derive every starting condition for a program proof. It also connects the generated result to a standard proof of total correctness.

Agent

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/wp-framework
Clone the repo
git clone --depth 1 https://github.com/Verified-zkEVM/evm-asm
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 5,568 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 $0.00000 $0.05568
Opus 5 $0.00000 $0.02784
Sonnet 5 $0.00000 $0.01114
Haiku 4.5 $0.00000 $0.00557

Measured 2d ago against content hash 73ef21b17437, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wp-framework 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 2d 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/wp-framework.md · 561 lines

How it starts

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

Rv64 WP Framework Guide

This guide explains the Rv64 weakest-precondition layer added under EvmAsm/Rv64/WP/. It is meant for proof authors who already know the separation-logic cpsTripleWithin style, but have not used the WP certificate mechanism before.

The short version: write the program and final postcondition, describe the control-flow shape, and let the WP layer build the precondition by composing certificates backwards. The final certificate still produces the usual total-correctness Hoare triple.

Imports

For ordinary users, import the CFG constructors and tactic surface:

import EvmAsm.Rv64.WP.CFG
import EvmAsm.Rv64.Tactics.WP

Most examples also need the existing block and frame tactics:

import EvmAsm.Rv64.Tactics.RunBlock
import EvmAsm.Rv64.Tactics.XPerm

Mental model

The main object is:

WP.CFG.Cert entry exit_ cr post

Read this as: starting at entry, the code requirement cr reaches exit_ within a generated step budget and establishes post.

A certificate stores the weakest-precondition result:

cfg.pre    -- Assertion generated by the WP calculus
cfg.sound  -- cpsTripleWithin cfg.nSteps entry exit_ cr cfg.pre post

So a top-level proof usually has this shape:

def cfg : WP.CFG.Cert entry exit_ cr post := ...

theorem spec :
    cpsTripleWithin cfg.nSteps entry exit_ cr cfg.pre post := by
  wp_rv64 cfg

wp_rv64 cfg is just the user-facing way to use cfg.sound.

Basic workflow

  1. Define the public postcondition first.

    Keep outcomes in the postcondition. Do not put success, failure, decoded result, or branch choices in the precondition. A decoding routine should usually expose a disjunction such as "success with value" or "failure with status", with static guards carried inside the relevant disjuncts.

  2. Synthesize straight-line leaf blocks from the postcondition when possible.

    For a single-exit leaf whose CodeReq is a concrete CodeReq.singleton, CodeReq.union, or CodeReq.ofProg tree, prefer wp_rv64_leaf_synth. The tactic works backwards from the requested postcondition, resolves registered @[spec_gen_rv64] instruction specs, and leaves the computed assertion as cfg.pre.

Read the full file on GitHub · 561 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. 2d ago First seen · 561 lines · 0 tokens per session scan A 73ef21b17437

Subscribe to this mod's changes

wp-framework is an agent published in the GitHub repository Verified-zkEVM/evm-asm (54 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,568 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.

Related

Other agents, from other repositories

editor

Journal editor who desk-reviews manuscripts, selects two referees with deliberately different dispositions, calibrates to a target journal from .claude/references/journal-profiles.md, and synthesizes an editorial decision (FATAL / ADDRESSABLE / TASTE). Used by /review-paper --peer [journal].

pedrohcgs/claude-code-my-workflow · 64 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

extract process to neqsim json

Extracts process simulation data from unstructured input (text descriptions, PFDs, operating data, tables, data sheets) and converts it into running NeqSim simulations. Small/medium processes use the JSON builder (ProcessSystem.fromJsonAndRun). Large multi-area processes are split into multiple ProcessSystems composed…

equinor/neqsim · 94 tokens

DeepScientist Core Agent

Core operating contract shared by all DeepScientist quest turns.

ResearAI/DeepScientist · 18 tokens

hecras-project-inspector

Loads and analyzes HEC-RAS projects to produce actionable intelligence reports. Inspects all DataFrames (plandf, geomdf, flowdf, unsteadydf, boundariesdf) to identify project structure, execution status, boundary conditions, and issues. Use when initializing projects, auditing project state, discovering runnable…

gpt-cmdr/ras-commander · 131 tokens

by-campaign

Plan design campaigns. Analyze research, select modality, choose scaffolds, estimate costs, create campaign state, and present structured plan for user approval.

001TMF/blatant-why · 33 tokens