fv-skills-baif 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to FVS (Formal Verification Skills) will be documented in th
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [2.0.1] - 2026-07-01
8
+
9
+ Documentation polish. No code or behavior changes.
10
+
11
+ ### Changed
12
+ - README "How It Works" now documents the Aeneas extraction repair loop, the trust audit, and the paper track's crypto loop -- previously only the v1.x five-stage functional-correctness flow was described; the tagline and Prerequisites now cover both the code and paper tracks
13
+ - `/fvs:help` documents the crypto loop's `--codex` single- vs dual-runtime flag (which stages accept it, what it swaps, and the no-silent-fallback behavior), and Quick Start / Core Workflow now surface the extraction and crypto-loop entry points
14
+ - Install screenshot (`assets/terminal.svg`) version label updated to the v2.0 line
15
+
7
16
  ## [2.0.0] - 2026-06-30
8
17
 
9
18
  Structural cleanup and bundle architecture. Updating from v1.3 applies all renames, moves, and removals automatically (deleted and renamed commands/agents self-heal on install); the installer prints a one-time summary of the changes below.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # FORMAL VERIFICATION SKILLS
4
4
 
5
- **Formal verification of Rust code with AI-assisted specification and proof. Multi-framework, multi-runtime.**
5
+ **Formal verification in Lean 4 with AI-assisted specification and proof — for Rust code (via Aeneas) and for maths/crypto papers. Multi-runtime.**
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/fv-skills-baif?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/fv-skills-baif)
8
8
  [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
@@ -54,9 +54,10 @@ Verify with `/fvs:help` inside your chosen runtime.
54
54
 
55
55
  ### Prerequisites (Lean 4 / Aeneas)
56
56
 
57
- - A Lean 4 project with `lakefile.toml` and `lean-toolchain`
58
- - Aeneas-generated output (`Types.lean`, `Funs.lean`) from your Rust source
59
- - Lean 4 toolchain installed and working
57
+ - A working Lean 4 toolchain, and a Lean project with `lakefile.toml` and `lean-toolchain`
58
+ - **Functional-correctness track:** Aeneas-generated Lean (`Types.lean`, `Funs.lean`). Produce it from a Rust crate with `/fvs:aeneas-extract`, or supply the output of an existing Aeneas run.
59
+ - **Paper track:** no Rust or Aeneas needed — bring your paper/source material (PDF, LaTeX, images).
60
+ - **Optional:** the Codex CLI, to run the crypto loop's thinking stages dual-runtime (`--codex`).
60
61
 
61
62
  ### Recommended: Lean LSP MCP Server
62
63
 
@@ -150,7 +151,9 @@ Commands are grouped into five bundles. Each bundle has a **router** command tha
150
151
 
151
152
  ## How It Works
152
153
 
153
- FVS follows a five-stage workflow. Each stage builds on the previous.
154
+ ### Functional-correctness track (Rust Lean 4)
155
+
156
+ This track verifies Rust that Aeneas has lowered to Lean 4. Starting from a Rust crate, `/fvs:aeneas-extract <path>` drives it through the bounded **extraction repair loop** — pin audit → classify → auto-apply / bisect / gate / escalate → reversible records — until you reach a clean build or a documented escalation. It writes reversible source records (`src-modifications.diff` plus a derived `.json`/`.md` and `src-assumptions.md`) at the crate root and never edits generated Lean. Once you have `Types.lean` / `Funs.lean`, the five-stage verification workflow begins:
154
157
 
155
158
  ### 1. Map
156
159
 
@@ -172,6 +175,23 @@ FVS follows a five-stage workflow. Each stage builds on the previous.
172
175
 
173
176
  `/fvs:lean-refactor <spec_path>` — Refactor, simplify, and decompose verified proofs. Applies tiered heuristics (dead code removal, simp sharpening, tactic golf, smart automation) while verifying compilation after every change. Three modes: safe, balanced (default), and aggressive.
174
177
 
178
+ ### 6. Audit
179
+
180
+ `/fvs:trust-audit <target>` — Build-backed audit of the trust surface. Runs a green-build precondition, then uses `#print axioms` to classify every in-scope declaration as verified / `sorry` / axiom. The classical trio (`propext`, `Classical.choice`, `Quot.sound`) is auto-noted as Lean/Mathlib-standard; any project-custom axiom must be justified or the gate reports NOT-CLEAN. Produces a re-runnable, dependency-ordered table under `.formalising/audits/`.
181
+
182
+ ### The paper track (maths / crypto)
183
+
184
+ The paper track formalises papers directly into Lean 4 — no Rust, no Aeneas. Two entry points:
185
+
186
+ - **One-shot:** `/fvs:lean-formalise` reads your PDFs / images / LaTeX (optionally grounded in a NotebookLM knowledge base via `/fvs:kb-setup`) and produces Lean definition and spec files in a single pass.
187
+ - **Iterative crypto loop:** for larger crypto formalisations, a topic-based, restartable loop of four stages:
188
+
189
+ `/fvs:crypto-plan` → `/fvs:crypto-execute` → `/fvs:crypto-eval` → `/fvs:crypto-followup` → repeat
190
+
191
+ A high-effort thinker authors each bounded plan; the executor runs it under a green-build guard; an adversarial eval tries to refute the spec, proof, and assumptions and ends in exactly one of ACCEPT / FOLLOWUP / HUMAN_RULING / BLOCKED; follow-up turns findings into the next plan (halting for a human ruling on modeling decisions).
192
+
193
+ **Single- vs dual-runtime (`--codex`).** By default the loop is single-runtime — the thinking stages (`crypto-plan`, `crypto-eval`, `crypto-followup`) run the in-runtime `fvs-crypto-thinker`. Pass `--codex` to hand a stage's thinking to an independent **Codex CLI** thinker instead, so the adversarial planner/evaluator runs on a *different engine* than the executor and blind spots don't correlate. `crypto-execute` is the runtime-neutral executor and takes no `--codex`. Without the Codex CLI installed, a `--codex` stage stops with an install hint rather than silently falling back.
194
+
175
195
  ---
176
196
 
177
197
  ## Uninstalling
@@ -23,18 +23,25 @@ Commands are grouped into five bundles. Each bundle has a router command (e.g. `
23
23
 
24
24
  ## Quick Start
25
25
 
26
- 1. `/fvs:map-code` - Analyze project, build dependency graph
27
- 2. `/fvs:fc-plan` - Select verification targets
28
- 3. `/fvs:lean-specify <function>` - Generate spec with sorry
29
- 4. `/fvs:lean-verify <spec_path>` - Attempt proof interactively
30
- 5. `/fvs:lean-refactor <spec_path>` - Golf and clean up verified proofs
31
- 6. `/fvs:lean-formalise` - Formalise paper/math content into Lean specs
26
+ **From a Rust crate functional-correctness track:**
27
+ 1. `/fvs:aeneas-extract <path>` - Extract Rust → Lean 4 via the bounded Aeneas repair loop
28
+ 2. `/fvs:map-code` - Analyze project, build dependency graph
29
+ 3. `/fvs:fc-plan` - Select verification targets
30
+ 4. `/fvs:lean-specify <function>` - Generate spec with sorry
31
+ 5. `/fvs:lean-verify <spec_path>` - Attempt proof interactively
32
+ 6. `/fvs:lean-refactor <spec_path>` - Golf and clean up verified proofs
33
+ 7. `/fvs:trust-audit <target>` - Audit the sorry/axiom trust surface
34
+
35
+ **From a paper — paper track:**
36
+ - `/fvs:lean-formalise` - One-shot formalisation of paper/math content, or
37
+ - `/fvs:crypto-plan <topic>` - Start the multi-iteration crypto loop (see Formalise below)
32
38
 
33
39
  ## Core Workflow
34
40
 
35
41
  ```
36
- /fvs:map-code → /fvs:fc-plan → /fvs:lean-specify → /fvs:lean-verify → /fvs:lean-refactor → repeat
37
- Paper track: /fvs:lean-formalise → /fvs:lean-verify → /fvs:lean-refactor
42
+ Code track: /fvs:aeneas-extract → /fvs:map-code → /fvs:fc-plan → /fvs:lean-specify → /fvs:lean-verify → /fvs:lean-refactor → /fvs:trust-audit
43
+ Paper track: /fvs:lean-formalise → /fvs:lean-verify → /fvs:lean-refactor
44
+ Crypto loop: /fvs:crypto-plan → /fvs:crypto-execute → /fvs:crypto-eval → /fvs:crypto-followup → repeat
38
45
  ```
39
46
 
40
47
  ## Bundles
@@ -188,24 +195,28 @@ Refactor, simplify, and decompose verified Lean proofs while preserving compilat
188
195
 
189
196
  Usage: `/fvs:lean-refactor Specs/Backend/Field/Sub.lean`
190
197
 
191
- The crypto formalisation loop (plan -> execute -> eval -> follow-up) is a topic-based, multi-iteration alternative to the one-shot `lean-formalise`. Its four stages share the artifact tree under `fv-plans/<topic>/` and the loop is restartable from those records. The loop is runtime-neutral (it runs as a same-runtime pair by default).
198
+ The crypto formalisation loop (plan -> execute -> eval -> follow-up) is a topic-based, multi-iteration alternative to the one-shot `lean-formalise`. Its four stages share the artifact tree under `fv-plans/<topic>/` and the loop is restartable from those records.
192
199
 
193
- **`/fvs:crypto-plan <topic>`**
200
+ **Single- vs dual-runtime (`--codex`).** By default the loop is *single-runtime*: the high-effort thinking (planning, adversarial eval, follow-up) is done by the in-runtime `fvs-crypto-thinker`. The three *thinking* stages — `crypto-plan`, `crypto-eval`, `crypto-followup` — also accept `--codex`, which hands that stage's thinking to an independent **Codex CLI** thinker instead. That makes the loop *dual-runtime*: the adversarial planner/evaluator runs on a different engine than the executor, reducing correlated blind spots. `crypto-execute` is the runtime-neutral executor and takes no `--codex`. Pass `--codex` without the Codex CLI installed and the stage stops with an install hint (never a silent fallback) — re-run without it to stay single-runtime.
201
+
202
+ **`/fvs:crypto-plan <topic> [nN] [--codex]`**
194
203
  Author the next bounded, runtime-neutral executor plan for a topic, grounded in the paper via the NotebookLM knowledge base (answers cached under `sources/`).
195
204
 
196
205
  Usage: `/fvs:crypto-plan "CKA from KEM"`
206
+ Usage: `/fvs:crypto-plan "CKA from KEM" --codex` # hand the planning think-step to Codex
197
207
 
198
208
  **`/fvs:crypto-execute <topic> nN`**
199
- Run the current iteration's bounded plan under the green-build guard; a failed proof triggers a short interactive redirect early.
209
+ Run the current iteration's bounded plan under the green-build guard; a failed proof triggers a short interactive redirect early. (Executor stage — takes no `--codex`.)
200
210
 
201
211
  Usage: `/fvs:crypto-execute "CKA from KEM" n1`
202
212
 
203
- **`/fvs:crypto-eval <topic> nN`**
213
+ **`/fvs:crypto-eval <topic> nN [--codex]`**
204
214
  Adversarially evaluate the iteration; ends in exactly one decision (ACCEPT / FOLLOWUP / HUMAN_RULING / BLOCKED).
205
215
 
206
216
  Usage: `/fvs:crypto-eval "CKA from KEM" n1`
217
+ Usage: `/fvs:crypto-eval "CKA from KEM" n1 --codex`
207
218
 
208
- **`/fvs:crypto-followup <topic> nN`**
219
+ **`/fvs:crypto-followup <topic> nN [--codex]`**
209
220
  Convert eval findings into the next bounded follow-up plan; HALTs for a human ruling on a modeling decision.
210
221
 
211
222
  Usage: `/fvs:crypto-followup "CKA from KEM" n1`
package/fv-skills/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fv-skills-baif",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Formal verification skills for Claude Code, Codex, OpenCode, and Gemini. Rust -> Lean 4 via Aeneas.",
5
5
  "bin": {
6
6
  "fv-skills-baif": "bin/install.js"