fv-skills-baif 2.3.5 → 2.3.7
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 +63 -0
- package/README.md +134 -342
- package/agents/fvs-crypto-executor.md +13 -9
- package/agents/fvs-executor.md +11 -1
- package/agents/fvs-external-modeler.md +15 -3
- package/agents/fvs-lean-refactorer.md +13 -4
- package/assets/terminal.svg +68 -0
- package/bin/install.js +32 -22
- package/commands/fvs/configure.md +8 -1
- package/commands/fvs/crypto-eval.md +42 -19
- package/commands/fvs/crypto-execute.md +38 -1
- package/commands/fvs/crypto-followup.md +46 -22
- package/commands/fvs/crypto-plan.md +46 -23
- package/commands/fvs/crypto-review.md +39 -3
- package/commands/fvs/fc-plan.md +108 -23
- package/commands/fvs/lean-formalise.md +16 -0
- package/commands/fvs/lean-refactor.md +16 -1
- package/commands/fvs/lean-spec-review.md +8 -1
- package/commands/fvs/lean-specify.md +16 -0
- package/commands/fvs/lean-verify.md +16 -0
- package/commands/fvs/map-code.md +96 -21
- package/commands/fvs/model-external.md +9 -1
- package/commands/fvs/sync-aeneas-verif.md +3 -3
- package/commands/fvs/trust-audit.md +90 -13
- package/fv-skills/VERSION +1 -1
- package/fv-skills/references/aeneas-patterns.md +3 -0
- package/fv-skills/references/lake-build.md +186 -0
- package/fv-skills/references/lean-refactoring.md +2 -0
- package/fv-skills/references/model-profiles.md +66 -0
- package/fv-skills/references/review-diagnostics.md +3 -0
- package/fv-skills/references/review-grounding.md +26 -2
- package/fv-skills/workflows/crypto-eval.md +27 -0
- package/fv-skills/workflows/crypto-execute.md +37 -1
- package/fv-skills/workflows/crypto-followup.md +30 -2
- package/fv-skills/workflows/crypto-plan.md +27 -0
- package/fv-skills/workflows/crypto-review.md +34 -2
- package/fv-skills/workflows/fc-plan.md +105 -13
- package/fv-skills/workflows/lean-formalise.md +13 -0
- package/fv-skills/workflows/lean-refactor.md +15 -1
- package/fv-skills/workflows/lean-spec-review.md +24 -2
- package/fv-skills/workflows/lean-specify.md +13 -0
- package/fv-skills/workflows/lean-verify.md +13 -0
- package/fv-skills/workflows/map-code.md +91 -11
- package/fv-skills/workflows/model-external.md +39 -0
- package/fv-skills/workflows/sync-aeneas-verif.md +1 -2
- package/fv-skills/workflows/trust-audit.md +91 -7
- package/package.json +11 -2
- package/pi/skills/fvs-configure/SKILL.md +8 -1
- package/pi/skills/fvs-crypto-eval/SKILL.md +42 -19
- package/pi/skills/fvs-crypto-execute/SKILL.md +38 -1
- package/pi/skills/fvs-crypto-followup/SKILL.md +46 -22
- package/pi/skills/fvs-crypto-plan/SKILL.md +46 -23
- package/pi/skills/fvs-crypto-review/SKILL.md +38 -2
- package/pi/skills/fvs-fc-plan/SKILL.md +107 -23
- package/pi/skills/fvs-lean-formalise/SKILL.md +16 -0
- package/pi/skills/fvs-lean-refactor/SKILL.md +16 -1
- package/pi/skills/fvs-lean-spec-review/SKILL.md +7 -0
- package/pi/skills/fvs-lean-specify/SKILL.md +16 -0
- package/pi/skills/fvs-lean-verify/SKILL.md +16 -0
- package/pi/skills/fvs-map-code/SKILL.md +95 -21
- package/pi/skills/fvs-model-external/SKILL.md +9 -1
- package/pi/skills/fvs-sync-aeneas-verif/SKILL.md +3 -3
- package/pi/skills/fvs-trust-audit/SKILL.md +90 -13
- package/scripts/build-plugin.cjs +229 -3
- package/scripts/fvs-codex-think.mjs +220 -120
- package/scripts/fvs-model-review.mjs +20 -14
- package/scripts/fvs-probe-inventory.mjs +978 -12
- package/scripts/fvs-review-grounding.mjs +60 -14
- package/scripts/fvs-spec-review.mjs +285 -63
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,69 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.3.7] - 2026-10-15
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The GitHub repository has a self-contained `skills/fvs-setup` entry, so the skills CLI can
|
|
14
|
+
discover FVS. It explains the native installation for Pi, Claude Code, Codex, OpenCode and Gemini
|
|
15
|
+
and asks before running an installer. Copying it alone does not install the FVS workflows (#81).
|
|
16
|
+
- A practical Lake builds reference covers targeted checks, import artifacts and caches without
|
|
17
|
+
changing your project's toolchain or dependency pins, and credits its source talk. The Lean
|
|
18
|
+
writing commands load it (#79).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- The README is shorter and organised around installation for each runtime, the two workflows,
|
|
23
|
+
commands, and updates and removal (#70).
|
|
24
|
+
- Codex thinking stages for `/fvs:crypto-plan`, `/fvs:crypto-eval` and `/fvs:crypto-followup`
|
|
25
|
+
receive the full crypto-thinker role and a complete context file, run read-only, and return their
|
|
26
|
+
response. The parent command checks the response and writes the stage files (#63).
|
|
27
|
+
- Crypto stages record requested, resolved and observed model settings separately and report a real
|
|
28
|
+
settings mismatch instead of completing the stage. Choosing OpenCode or Gemini as a statement
|
|
29
|
+
reviewer now says that route is unavailable and offers Codex, Claude, a fresh Pi session or an
|
|
30
|
+
acknowledged other reviewer, rather than substituting one (#63).
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Every Lean-writing specialist (executor, crypto executor, external modeler and Lean refactorer)
|
|
35
|
+
is granted lean-lsp-mcp diagnostics and goal states, and the Gemini and OpenCode conversions keep
|
|
36
|
+
those grants. Effective access inside each host has not been verified yet (#74).
|
|
37
|
+
- The README lists OpenCode's help command as `/fvs-help`, the name the installer creates.
|
|
38
|
+
- `npm run check:plugin`, which `npm publish` runs, no longer fails on macOS, where the default
|
|
39
|
+
temporary directory is reached through a symlink.
|
|
40
|
+
|
|
41
|
+
## [2.3.6] - 2026-09-29
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- `/fvs:map-code`, `/fvs:fc-plan`, and `/fvs:trust-audit` first check whether the project has a
|
|
46
|
+
verified probe-aeneas: its Aeneas, Charon, and Lean versions must match a tested combination and
|
|
47
|
+
every helper must report the tested version. On macOS arm64, FVS can install the pinned official
|
|
48
|
+
probe-aeneas v0.20.0 into its own versioned directory after you agree, and it runs extraction in
|
|
49
|
+
a sandbox with no network access and no writes outside the project's build directories, the
|
|
50
|
+
output, and a private temporary directory. Without a verified probe you can set it up, continue
|
|
51
|
+
without a graph (qualitative notes only, no counts or verdicts), or cancel. Linux support is
|
|
52
|
+
tracked in #77 (#69).
|
|
53
|
+
- Crypto and Lean specification reviews report how many grounding signature lines they charge and
|
|
54
|
+
the first reference that exceeds the budget. A read-only `preflight` checks a request without
|
|
55
|
+
contacting a reviewer (#73).
|
|
56
|
+
- In Codex marketplace installs, a workflow that requests an unregistered FVS specialist now warns.
|
|
57
|
+
It then runs a labeled generic agent, or stops before dispatch when the step depends on the
|
|
58
|
+
specialist's settings. The README explains how to switch to the direct Codex installation, which
|
|
59
|
+
registers the specialist roles (#71).
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- Completed Claude and Codex reviews are no longer rejected when the reviewer writes one plain
|
|
64
|
+
progress sentence before the required title (#72).
|
|
65
|
+
- Native reviewers run in their own process group with a 20-minute review deadline and a 30-second
|
|
66
|
+
version and authentication deadline (`FVS_REVIEW_TIMEOUT_MS`, `FVS_REVIEW_AUTH_TIMEOUT_MS`). On
|
|
67
|
+
timeout or interruption FVS stops the whole group, including descendants. Cleanup is tested on
|
|
68
|
+
macOS and Linux; Windows refuses to launch native reviewers (#75).
|
|
69
|
+
- When its sync metadata is missing, `/fvs:sync-aeneas-verif` points only to `/fvs:update`, which
|
|
70
|
+
updates the installation you already have, and no longer suggests the npm installer.
|
|
71
|
+
|
|
9
72
|
## [2.3.5] - 2026-09-21
|
|
10
73
|
|
|
11
74
|
### Added
|
package/README.md
CHANGED
|
@@ -1,403 +1,195 @@
|
|
|
1
|
-
|
|
1
|
+
# Formal Verification Skills
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
FVS helps AI coding assistants write Lean 4 specifications and proofs. The functional-correctness
|
|
4
|
+
track verifies Rust translated by Aeneas. The paper track formalises mathematics and cryptography
|
|
5
|
+
directly from papers. You choose the targets, review the statements and decide when proof work begins.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/fv-skills-baif)
|
|
8
|
-
[
|
|
9
|
-
|
|
10
|
-
<br>
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npx fv-skills-baif
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**Works on Mac, Windows, and Linux. Supports Pi, Claude Code, Codex, OpenCode, and Gemini CLI.**
|
|
17
|
-
|
|
18
|
-
<br>
|
|
8
|
+
[Pi package](https://pi.dev/packages/fv-skills-baif) · [MIT license](LICENSE)
|
|
19
9
|
|
|
20
10
|

|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## What This Is
|
|
29
|
-
|
|
30
|
-
FVS encodes the expert formal verification workflow into skills for AI coding assistants. It takes Rust code through a structured pipeline — dependency analysis, deep code understanding, specification generation, and proof — using the AI to handle the tedious parts while you stay in control of the verification strategy.
|
|
12
|
+
## Getting started
|
|
31
13
|
|
|
32
|
-
|
|
14
|
+
Run `npx fv-skills-baif` for an interactive installation, or select your runtime explicitly:
|
|
33
15
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
| Runtime | User/global install | Help after restarting the session |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Pi | `npx fv-skills-baif --pi --global` | `/skill:fvs-help` |
|
|
19
|
+
| Claude Code | `npx fv-skills-baif --claude --global` | `/fvs:help` |
|
|
20
|
+
| Codex | `npx fv-skills-baif --codex --global` | `$fvs-help` |
|
|
21
|
+
| Gemini CLI | `npx fv-skills-baif --gemini --global` | `/fvs:help` |
|
|
22
|
+
| OpenCode | `npx fv-skills-baif --opencode --global` | `/fvs-help` |
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
Replace `--global` with `--local` to install for the current project. Non-Pi installs copy the
|
|
25
|
+
commands and support files into the runtime's configuration directory. Use
|
|
26
|
+
`npx fv-skills-baif --help` for custom directory options. Keep one FVS installation per runtime.
|
|
40
27
|
|
|
41
|
-
|
|
28
|
+
### Pi
|
|
42
29
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Pi package
|
|
46
|
-
|
|
47
|
-
Use the unified installer for an updateable user install or an exact project pin:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx fv-skills-baif --pi --global
|
|
51
|
-
npx fv-skills-baif --pi --local --pi-version 2.3.4
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Pi's default scope is user/global. The default `latest` source stays unpinned and follows Pi
|
|
55
|
-
package updates. An exact `--pi-version X.Y.Z` source is pinned and is skipped by `pi update`. If
|
|
56
|
-
FVS exists in the opposite scope, interactive installs offer keep, move, or cancel; scripts must pass
|
|
57
|
-
`--pi-conflict keep|move`. When both remain, Pi's project/local package takes precedence over the
|
|
58
|
-
user/global package.
|
|
59
|
-
|
|
60
|
-
Direct Pi commands remain available:
|
|
30
|
+
The installer delegates to Pi's native package manager. You can also use it directly:
|
|
61
31
|
|
|
62
32
|
```bash
|
|
63
33
|
pi install npm:fv-skills-baif
|
|
64
|
-
pi install npm:fv-skills-baif
|
|
34
|
+
pi install npm:fv-skills-baif --local
|
|
65
35
|
pi update npm:fv-skills-baif
|
|
66
|
-
pi remove npm:fv-skills-baif
|
|
67
|
-
pi remove npm:fv-skills-baif --local
|
|
68
36
|
```
|
|
69
37
|
|
|
70
|
-
|
|
71
|
-
`
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
38
|
+
Project packages require project trust and take precedence over the user installation.
|
|
39
|
+
The default `latest` source stays updateable. `--pi-version X.Y.Z` selects a chosen published version;
|
|
40
|
+
X.Y.Z is a metavariable. Exact pins are skipped by `pi update`; rollback means reinstalling a chosen
|
|
41
|
+
published pin. If FVS exists in the opposite scope, choose keep, move or cancel. Scripts must pass
|
|
42
|
+
`--pi-conflict keep` or `--pi-conflict move`. Pi owns its settings paths, so `--config-dir` does not
|
|
43
|
+
redirect them. See [Pi package documentation](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/packages.md).
|
|
76
44
|
|
|
77
|
-
###
|
|
45
|
+
### Claude Code and Codex marketplace
|
|
78
46
|
|
|
79
|
-
|
|
80
|
-
once, then install FVS from its `beneficial-ai-foundation` marketplace identity:
|
|
47
|
+
Install from the [BAIF catalog](https://github.com/Beneficial-AI-Foundation/plugins):
|
|
81
48
|
|
|
82
49
|
```bash
|
|
83
|
-
# Claude Code
|
|
84
50
|
claude plugin marketplace add Beneficial-AI-Foundation/plugins
|
|
85
51
|
claude plugin install fvs@beneficial-ai-foundation
|
|
86
|
-
|
|
87
|
-
# Codex
|
|
88
52
|
codex plugin marketplace add Beneficial-AI-Foundation/plugins
|
|
89
53
|
codex plugin add fvs@beneficial-ai-foundation
|
|
90
54
|
```
|
|
91
55
|
|
|
92
|
-
|
|
93
|
-
Codex
|
|
56
|
+
Claude's default is user scope; `--scope project` and `--scope local` select plugin scopes.
|
|
57
|
+
Codex has its own plugin interface; do not reuse Claude's scope flags. After restarting, use
|
|
58
|
+
`/fvs:help` in Claude or `$fvs:help` in Codex.
|
|
94
59
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
# Codex
|
|
101
|
-
codex plugin marketplace upgrade beneficial-ai-foundation
|
|
102
|
-
codex plugin add fvs@beneficial-ai-foundation
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
The BAIF Git catalog is a versioned distribution source that can list multiple independently
|
|
106
|
-
released plugins. It is separate from OpenAI's universal public Plugins Directory, which has its
|
|
107
|
-
own per-plugin submission process.
|
|
60
|
+
The Codex marketplace ships specialist prompts as Markdown without registering Codex agent roles.
|
|
61
|
+
FVS warns when a requested role is missing. A settings-independent step may use a labelled generic
|
|
62
|
+
agent with the full specialist prompt; its identity, sandbox, model and reasoning effort are not
|
|
63
|
+
guaranteed. A settings-dependent step stops before dispatch or file writes. Registered roles also
|
|
64
|
+
need their settings checked.
|
|
108
65
|
|
|
109
|
-
|
|
66
|
+
The npm installer supplies a complete, separately managed Codex installation with roles, hooks and
|
|
67
|
+
configuration. To switch channels, remove the plugin first:
|
|
110
68
|
|
|
111
69
|
```bash
|
|
112
|
-
|
|
70
|
+
codex plugin remove fvs@beneficial-ai-foundation
|
|
71
|
+
npx fv-skills-baif --codex --global
|
|
113
72
|
```
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
1. **Runtime** — Pi, Claude Code, Codex, OpenCode, Gemini, or all
|
|
117
|
-
2. **Location** — Global (all projects) or local (current project only)
|
|
118
|
-
3. **Pi version** — updateable latest or an exact pinned version
|
|
119
|
-
|
|
120
|
-
Pi installation delegates to Pi's native package manager; it never copies files into Pi's managed
|
|
121
|
-
cache. `--config-dir` continues to apply to supported non-Pi runtimes and is ignored for Pi.
|
|
122
|
-
Verify with `/skill:fvs-help` in Pi or `/fvs:help` in the other runtimes.
|
|
123
|
-
|
|
124
|
-
### Prerequisites (Lean 4 / Aeneas)
|
|
125
|
-
|
|
126
|
-
- A working Lean 4 toolchain, and a Lean project with `lakefile.toml` and `lean-toolchain`
|
|
127
|
-
- **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.
|
|
128
|
-
- **Paper track:** no Rust or Aeneas needed — bring your paper/source material (PDF, LaTeX, images).
|
|
129
|
-
- **Optional:** the Codex CLI, to run the crypto loop's thinking stages dual-runtime (`--codex`).
|
|
130
|
-
|
|
131
|
-
### Recommended: Lean LSP MCP Server
|
|
132
|
-
|
|
133
|
-
For enhanced Lean 4 proof development with LLMs, install the [lean-lsp-mcp](https://github.com/oOo0oOo/lean-lsp-mcp) server. It provides instant goal state checking, local lemma search, and proof diagnostics without rebuilding.
|
|
134
|
-
|
|
135
|
-
**Note:** Avoid using the `lean_multi_attempt` tool for formal verification tasks - FV proof states often explode in size, making multi-attempt testing prohibitively slow.
|
|
136
|
-
|
|
137
|
-
### Staying Updated
|
|
138
|
-
|
|
139
|
-
For a marketplace install, invoke `/fvs:update` in Claude Code or `$fvs:update` in Codex. For an npm
|
|
140
|
-
install, run:
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
npx fv-skills-baif@latest
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
<details>
|
|
147
|
-
<summary><strong>Non-interactive Install (Docker, CI, Scripts)</strong></summary>
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
# Claude Code
|
|
151
|
-
npx fv-skills-baif --claude --global # Install to ~/.claude/
|
|
152
|
-
npx fv-skills-baif --claude --local # Install to ./.claude/
|
|
153
|
-
|
|
154
|
-
# Codex
|
|
155
|
-
npx fv-skills-baif --codex --global # Install to ~/.codex/
|
|
74
|
+
Plugin updates, including `$fvs:update`, do not register roles or run the npm installer.
|
|
156
75
|
|
|
157
|
-
|
|
158
|
-
npx fv-skills-baif --opencode --global # Install to ~/.config/opencode/
|
|
76
|
+
### Before your first Lean task
|
|
159
77
|
|
|
160
|
-
|
|
161
|
-
|
|
78
|
+
Use a Lean project with `lakefile.lean` or `lakefile.toml` and its existing `lean-toolchain` pin.
|
|
79
|
+
For Rust verification, supply Aeneas-generated `Types.lean` and `Funs.lean`, or start with
|
|
80
|
+
`/fvs:aeneas-extract`. Papers need no Rust or Aeneas. NotebookLM integration via `/fvs:kb-setup` is optional.
|
|
162
81
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
82
|
+
We recommend [lean-lsp-mcp](https://github.com/oOo0oOo/lean-lsp-mcp) for goal states and diagnostics.
|
|
83
|
+
Configure it in your chosen runtime and check that the writing agent can access it; IDE diagnostics
|
|
84
|
+
alone do not provide goal states. If live feedback is required but unavailable, the task stops.
|
|
85
|
+
Compiler-only work needs your explicit acceptance of that fallback. Project build, style and trust
|
|
86
|
+
checks still apply. [Practical Lake builds](fv-skills/references/lake-build.md) explains targeted
|
|
87
|
+
checks, import artifacts and caches without changing your project's toolchain or dependency pins.
|
|
166
88
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
89
|
+
FC dependency graphs use [probe-aeneas](https://github.com/Beneficial-AI-Foundation/probe-aeneas).
|
|
90
|
+
`/fvs:map-code` and `/fvs:fc-plan` first check your project's probe/toolchain combination and print
|
|
91
|
+
readable setup diagnostics, so you never need to read the compatibility data yourself. If the
|
|
92
|
+
combination is not verified, they offer probe setup, continuing without a graph, or cancelling.
|
|
93
|
+
Verified mapping writes the function inventory and progress to `.formalising/CODEMAP.md`.
|
|
94
|
+
Unsupported platforms or unverified probe/toolchain combinations cannot produce a verified graph.
|
|
95
|
+
SPQR compatibility is not supported. Tools are not installed automatically, and runtime installation
|
|
96
|
+
alone does not establish tool access.
|
|
175
97
|
|
|
176
|
-
|
|
98
|
+
FVS asks for runtime, model and effort choices at each relevant stage. Requested settings,
|
|
99
|
+
resolved settings and observed settings are recorded separately; unavailable observations are stated
|
|
100
|
+
explicitly. Use `/fvs:configure` to save defaults. See [model profiles](fv-skills/references/model-profiles.md)
|
|
101
|
+
for selection rules and runtime limitations.
|
|
177
102
|
|
|
178
|
-
|
|
103
|
+
## Workflows
|
|
179
104
|
|
|
180
|
-
|
|
105
|
+
### Functional correctness
|
|
181
106
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| Command | Description |
|
|
187
|
-
|---------|-------------|
|
|
188
|
-
| `/fvs:aeneas-extract` | Drive a Rust crate/folder/file through the bounded Aeneas extraction repair loop (pin audit, classify, auto-apply/bisect/gate/escalate, reversible records) |
|
|
189
|
-
| `/fvs:model-external` | Model one lockfile/sysroot-grounded external Rust stub and its bounded dependency closure, with reversible writes and separate model/spec reviews |
|
|
190
|
-
| `/fvs:sync-aeneas-verif` | Sync Aeneas/Charon upstream docs and reconcile the extraction blocker catalog via two specialised agents |
|
|
191
|
-
|
|
192
|
-
### Context — `/fvs:context`
|
|
193
|
-
|
|
194
|
-
| Command | Description |
|
|
195
|
-
|---------|-------------|
|
|
196
|
-
| `/fvs:map-code` | Build function dependency graph from extracted code and Rust source |
|
|
197
|
-
|
|
198
|
-
### Formal-Core — `/fvs:fc`
|
|
199
|
-
|
|
200
|
-
| Command | Description |
|
|
201
|
-
|---------|-------------|
|
|
202
|
-
| `/fvs:fc-plan` | Pick next verification targets via greedy dependency graph traversal |
|
|
203
|
-
| `/fvs:model-external` | Resolve, model, review, prove, build, and trust-audit one external Rust stub plus its bounded external-stub closure |
|
|
204
|
-
| `/fvs:lean-specify` | Generate a style-checked Lean spec skeleton with `@[step]` theorem pattern |
|
|
205
|
-
| `/fvs:lean-spec-review` | Adversarially review an FC specification with a chosen runtime, model, and effort |
|
|
206
|
-
| `/fvs:lean-verify` | Attempt proof with domain tactics while blocking new target-style violations |
|
|
207
|
-
| `/fvs:natural-language` | Generate natural language explanation of module or function with pre/post conditions |
|
|
208
|
-
| `/fvs:lean-refactor` | Refactor, simplify, and decompose verified proofs (dead code removal, simp sharpening, tactic golf) — *also in Formalise* |
|
|
209
|
-
| `/fvs:trust-audit` | Build-backed audit of every sorry/axiom affecting a target layer; `#print axioms` classification, fail-if-unjustified gate, dependency-ordered table |
|
|
210
|
-
|
|
211
|
-
`lean-specify` and `lean-verify` load a target style guide from
|
|
212
|
-
`.formalising/fvs-config.json` (`project.style_guide_path`) or discover standard files such as
|
|
213
|
-
`doc/STYLE_GUIDE`. With no guide they enforce a 100-column fallback. Their post-write gate also
|
|
214
|
-
rejects ordinary Lean identifiers with three or more namespace dots, steering generated code
|
|
215
|
-
toward scoped namespaces, `open`, and local names.
|
|
216
|
-
|
|
217
|
-
After `lean-specify`, an interactive review menu resolves reviewer, exact catalog model, and
|
|
218
|
-
model-supported effort; it never auto-selects a choice. It offers the other runtime first, a fresh
|
|
219
|
-
reviewer in the current runtime, or another provider. Other providers use an exported source packet
|
|
220
|
-
and imported response. One-run `Skip review` records `Unreviewed (user skipped)` and does not begin
|
|
221
|
-
proof work. Reviews and source hashes live under `.formalising/spec-reviews/`.
|
|
222
|
-
|
|
223
|
-
The reviewer stays read-only and `review.md` stays immutable. The `lean-specify` authoring seat
|
|
224
|
-
writes separate `triage.md`. PASS proceeds; APPROVE-WITH-EDITS also proceeds after accepted bounded
|
|
225
|
-
edits pass the structure/style/build gates, with no redundant second review. Only REVISE/BLOCKED
|
|
226
|
-
starts another fresh review, carrying prior records as untrusted history, with a three-round cap.
|
|
227
|
-
|
|
228
|
-
Automatic review works even without a config file. To disable the automatic menu, merge this
|
|
229
|
-
setting into `.formalising/fvs-config.json` (or create that file with just this object):
|
|
230
|
-
|
|
231
|
-
```json
|
|
232
|
-
{"spec_review": {"automatic": false}}
|
|
107
|
+
```text
|
|
108
|
+
/fvs:natural-language → /fvs:lean-specify → automatic fresh /fvs:lean-spec-review
|
|
109
|
+
↓ when you request proof work
|
|
110
|
+
/fvs:lean-verify → repeat
|
|
233
111
|
```
|
|
234
112
|
|
|
235
|
-
`/fvs:
|
|
236
|
-
|
|
237
|
-
|
|
113
|
+
Use `/fvs:map-code` to map dependencies and `/fvs:fc-plan` to choose targets in dependency order.
|
|
114
|
+
The FC prover works interactively, one-sorry at a time, with reviewable Write diffs and compilation
|
|
115
|
+
feedback. Finish with `/fvs:lean-refactor` and `/fvs:trust-audit`.
|
|
116
|
+
`/fvs:model-external` handles external Rust stubs with separate model and specification reviews,
|
|
117
|
+
reversible writes, proof completion and a trust audit.
|
|
238
118
|
|
|
239
|
-
|
|
240
|
-
`.formalising/proof-engineering/`. Commands read `index.md` first, load at most eight relevant
|
|
241
|
-
lessons as delimited untrusted reference data, and reconcile at most three evidence-backed
|
|
242
|
-
candidates after the run. Every lesson has its own Markdown file under `fc/`, `crypto/`, or
|
|
243
|
-
`shared/`, capped at 800 words, so the memory stays searchable and reviewable instead of growing
|
|
244
|
-
into one long note.
|
|
245
|
-
Legacy `.formalising/PROOF-NOTES.md` content is retained as migration input. The store never keeps
|
|
246
|
-
secrets, raw transcripts, ephemeral error dumps, unsupported guesses, or inferred preferences.
|
|
119
|
+
### Papers and crypto
|
|
247
120
|
|
|
248
121
|
```text
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
│ └── lessons/
|
|
254
|
-
│ ├── fc/ # Functional-correctness lessons
|
|
255
|
-
│ ├── crypto/ # Crypto proof and modeling lessons
|
|
256
|
-
│ └── shared/ # Lessons validated across tracks
|
|
257
|
-
└── fv-plans/ # Formalisation plans and reviews
|
|
122
|
+
/fvs:crypto-plan → automatic fresh /fvs:crypto-review → /fvs:crypto-execute
|
|
123
|
+
↑ (when you request it)
|
|
124
|
+
/fvs:crypto-followup ← /fvs:crypto-eval ←────────────────────┘
|
|
125
|
+
└──────────── automatic fresh review before execution
|
|
258
126
|
```
|
|
259
127
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
| `/fvs:update` | Update FVS through the current installation channel |
|
|
279
|
-
| `/fvs:reapply-patches` | Preserve customizations across FVS updates (patches for npm installs; fork guidance for plugin installs) |
|
|
280
|
-
| `/fvs:kb-setup` | Set up NotebookLM knowledge base integration (venv, auth, config) |
|
|
281
|
-
|
|
282
|
-
`/fvs:configure` stores concrete model IDs under the runtime and exact stage that reported them.
|
|
283
|
-
The quality profile is role-aware: authority artifacts use the strongest detected model with max
|
|
284
|
-
reasoning, execution/proof filling uses the executor model with xhigh, and research/eval/audit work
|
|
285
|
-
uses a smaller model with high. Claude and Codex family preferences never cross runtimes; Pi uses
|
|
286
|
-
provider-qualified IDs and keeps its active provider for ordinary work. Each interactive command
|
|
287
|
-
shows one model/effort selection manifest with one-run, save, notes, and cancel paths. Missing models
|
|
288
|
-
or unsupported efforts require a user choice; unresolved noninteractive runs fail before dispatch.
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## How It Works
|
|
293
|
-
|
|
294
|
-
### Functional-correctness track (Rust → Lean 4)
|
|
295
|
-
|
|
296
|
-
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. If extraction leaves a required external stub, `/fvs:model-external <stub>` resolves its exact Cargo/vendor/rustc source, journals a reversible hand-written Lean candidate, runs separate model-fidelity and specification reviews, completes proofs, builds, and requires a CLEAN trust audit. Unsafe Rust stops; observable effects require `HUMAN_RULING`. Once required external models are complete, the verification workflow begins:
|
|
297
|
-
|
|
298
|
-
### 1. Map
|
|
299
|
-
|
|
300
|
-
`/fvs:map-code` — Run probe-aeneas >= 0.19.0 to build an exact, reproducible function inventory and dependency graph. Models annotate and prioritize the canonical list but never determine its membership or count. Produces `CODEMAP.md` with every in-scope Rust function, its dependencies, and verification status.
|
|
301
|
-
|
|
302
|
-
### 2. Plan
|
|
303
|
-
|
|
304
|
-
`/fvs:fc-plan` — Walk the dependency graph bottom-up to find optimal verification targets. Prioritizes leaf functions (no unverified dependencies) using greedy traversal. Performs deep Rust source analysis to reason about pre/post conditions and bounds.
|
|
305
|
-
|
|
306
|
-
### 3. Specify
|
|
307
|
-
|
|
308
|
-
`/fvs:lean-specify <function>` — Generate a specification skeleton for the target function. For Lean 4: uses the `@[step] theorem fn_spec` pattern with preconditions from Rust source analysis and postconditions matching function behavior.
|
|
309
|
-
|
|
310
|
-
The command reads the bounded proof-engineering index and may reviewably add one-file-per-lesson
|
|
311
|
-
functional-correctness insights for later sessions.
|
|
312
|
-
|
|
313
|
-
### 4. Verify
|
|
314
|
-
|
|
315
|
-
`/fvs:lean-verify <function>` — Attempt to prove the specification. For Lean 4: uses domain-specific tactics (`step`, `simp`, `ring`, `field_simp`, `omega`). Reports proof status and remaining goals if incomplete.
|
|
316
|
-
|
|
317
|
-
The proof loop loads a bounded selection from `.formalising/proof-engineering/` before research and
|
|
318
|
-
can reviewably retain green-build patterns or lessons evidenced by actual Lean diagnostics.
|
|
128
|
+
`/fvs:lean-formalise` creates definitions and specification skeletons in one pass. For larger work,
|
|
129
|
+
the crypto loop uses a dedicated whole-unit executor. Evaluation returns ACCEPT, FOLLOWUP,
|
|
130
|
+
HUMAN_RULING or BLOCKED; unresolved human rulings and blockers stop the loop.
|
|
131
|
+
Thinking stages can explicitly use `--codex`; execution has no such flag. An unavailable requested
|
|
132
|
+
runtime requires a new choice rather than a silent fallback.
|
|
133
|
+
|
|
134
|
+
Both tracks use a fresh read-only reviewer and immutable review evidence. The author owns triage
|
|
135
|
+
and accepted edits. Approval after edits requires the prescribed checks; revision rounds are bounded.
|
|
136
|
+
Skipped, disabled, failed or pending review does not approve a statement or start proof/execution.
|
|
137
|
+
You can opt out of automatic review and explicitly request trusted-path work while retaining its
|
|
138
|
+
unreviewed status. See [review policy](fv-skills/references/review-policy.md),
|
|
139
|
+
[FC statement review](fv-skills/references/fc-spec-review.md) and
|
|
140
|
+
[crypto plan review](fv-skills/references/crypto-plan-review.md).
|
|
141
|
+
|
|
142
|
+
The learning store lives in `.formalising/proof-engineering/`. Commands read `index.md` first,
|
|
143
|
+
load at most eight relevant lessons from `lessons/` (`fc/`, `crypto/`, `shared/`) as untrusted data,
|
|
144
|
+
and propose at most three evidence-backed updates. Fresh crypto review remains memory-blind.
|
|
145
|
+
[Learning-store details](fv-skills/references/proof-engineering-loop.md).
|
|
319
146
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
`/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.
|
|
323
|
-
|
|
324
|
-
### 6. Audit
|
|
325
|
-
|
|
326
|
-
`/fvs:trust-audit <target>` — Build-backed audit of the trust surface. It target-filters the same canonical probe-aeneas inventory, then uses `#print axioms` to classify every supplied function as verified / `sorry` / axiom / uninspectable. The classical trio (`propext`, `Classical.choice`, `Quot.sound`) is auto-noted as Lean/Mathlib-standard; any project-custom axiom, sorry, or uninspectable entry keeps the gate NOT-CLEAN. Produces a re-runnable, dependency-ordered table under `.formalising/audits/`.
|
|
327
|
-
|
|
328
|
-
### The paper track (maths / crypto)
|
|
329
|
-
|
|
330
|
-
The paper track formalises papers directly into Lean 4 — no Rust, no Aeneas. Two entry points:
|
|
331
|
-
|
|
332
|
-
- **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.
|
|
333
|
-
- **Iterative crypto loop:** for larger crypto formalisations, a topic-based, restartable loop with
|
|
334
|
-
a fresh pre-execution review gate:
|
|
335
|
-
|
|
336
|
-
`/fvs:crypto-plan` → `/fvs:crypto-review` → `/fvs:crypto-execute` → `/fvs:crypto-eval` → `/fvs:crypto-followup` → `/fvs:crypto-review` → repeat
|
|
337
|
-
|
|
338
|
-
A high-effort thinker authors each bounded plan. Before execution, a selected Codex, Claude, or
|
|
339
|
-
Other fresh reviewer attacks the plan or follow-up under read-only controls and returns an
|
|
340
|
-
evidence-backed APPROVE / APPROVE-WITH-EDITS / REJECT verdict. The executor runs an approved plan
|
|
341
|
-
under a green-build guard; the post-execution adversarial eval tries to refute the spec, proof,
|
|
342
|
-
and assumptions and ends in exactly one of ACCEPT / FOLLOWUP / HUMAN_RULING / BLOCKED. Follow-up
|
|
343
|
-
turns findings into the next plan (halting for a human modeling ruling) and is reviewed again
|
|
344
|
-
before execution.
|
|
147
|
+
## Commands
|
|
345
148
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
accepted adversarial eval or explicit human ruling. The `crypto-review` gate is deliberately
|
|
350
|
-
memory-blind. It labels cross-runtime, same-runtime fresh reviewer, and unverified provenance;
|
|
351
|
-
Other uses packet export/import. APPROVE-WITH-EDITS becomes terminal after the authoring seat
|
|
352
|
-
applies accepted edits and reruns gates, with no second review. REJECT starts a fresh reviewed
|
|
353
|
-
revision with prior history, capped at three reviewer rounds per invocation. Automatic plan and
|
|
354
|
-
follow-up handoff asks reviewer -> model -> effort and never auto-selects. One-run `Skip review`
|
|
355
|
-
records `Unreviewed (user skipped)` and never starts execution. To opt out persistently, merge
|
|
356
|
-
`"crypto_review": {"automatic": false}` into `.formalising/fvs-config.json`; standalone review
|
|
357
|
-
and explicit trusted-path execution remain available without fabricating approval.
|
|
149
|
+
The table uses Claude command notation. Use the help entry for your channel to find its spelling
|
|
150
|
+
and arguments. Bundle routers list their members when invoked without arguments.
|
|
151
|
+
[Full command help](commands/fvs/help.md).
|
|
358
152
|
|
|
359
|
-
|
|
153
|
+
| Bundle | Members |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `/fvs:aeneas` | `/fvs:aeneas-extract`, `/fvs:model-external`, `/fvs:sync-aeneas-verif` |
|
|
156
|
+
| `/fvs:context` | `/fvs:map-code` |
|
|
157
|
+
| `/fvs:fc` | `/fvs:fc-plan`, `/fvs:natural-language`, `/fvs:lean-specify`, `/fvs:lean-spec-review`, `/fvs:lean-verify`, `/fvs:lean-refactor`, `/fvs:model-external`, `/fvs:trust-audit` |
|
|
158
|
+
| `/fvs:formalise` | `/fvs:lean-formalise`, `/fvs:lean-refactor`, `/fvs:crypto-plan`, `/fvs:crypto-review`, `/fvs:crypto-execute`, `/fvs:crypto-eval`, `/fvs:crypto-followup` |
|
|
159
|
+
| `/fvs:manage` | `/fvs:help`, `/fvs:configure`, `/fvs:update`, `/fvs:reapply-patches`, `/fvs:kb-setup` |
|
|
360
160
|
|
|
361
|
-
|
|
161
|
+
## Updates and removal
|
|
362
162
|
|
|
363
|
-
|
|
163
|
+
Use your channel's FVS update command, or rerun the npm installer with `fv-skills-baif@latest` and
|
|
164
|
+
the same runtime/scope flags. `/fvs:reapply-patches` helps retain local customizations.
|
|
165
|
+
For marketplace updates:
|
|
364
166
|
|
|
365
167
|
```bash
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
# Local (current project)
|
|
371
|
-
npx fv-skills-baif --claude --local --uninstall
|
|
168
|
+
claude plugin marketplace update beneficial-ai-foundation
|
|
169
|
+
claude plugin update fvs@beneficial-ai-foundation
|
|
170
|
+
codex plugin marketplace upgrade beneficial-ai-foundation
|
|
171
|
+
codex plugin add fvs@beneficial-ai-foundation
|
|
372
172
|
```
|
|
373
173
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
FVS builds on the work of several open-source projects:
|
|
381
|
-
|
|
382
|
-
- **[Aeneas](https://github.com/AeneasVerif/aeneas)** -- FVS incorporates and adapts
|
|
383
|
-
documentation and proof skills from the Aeneas verification framework (Apache 2.0).
|
|
384
|
-
The upstream Aeneas documentation is stored in `fv-skills/upstream/aeneas/` and can
|
|
385
|
-
be synced with `/fvs:sync-aeneas-verif`.
|
|
386
|
-
|
|
387
|
-
- **[GSD (Get Shit Done)](https://github.com/gsd-build/get-shit-done)** -- FVS follows
|
|
388
|
-
the GSD plugin architecture for Claude Code skill distribution (MIT).
|
|
389
|
-
|
|
390
|
-
- **[lean-lsp-mcp](https://github.com/oOo0oOo/lean-lsp-mcp)** -- MCP server for Lean
|
|
391
|
-
LSP integration, referenced in proof workflows (MIT).
|
|
392
|
-
|
|
393
|
-
Individual contributions:
|
|
174
|
+
Remove an npm installation with the same runtime/scope and `--uninstall`, for example
|
|
175
|
+
`npx fv-skills-baif --claude --local --uninstall`. For Pi, use `pi remove npm:fv-skills-baif`
|
|
176
|
+
for the user installation or `pi remove npm:fv-skills-baif --local` for the project. Unified Pi removal
|
|
177
|
+
also supports `npx fv-skills-baif --pi --global --uninstall` (or `--local`). Remove a marketplace
|
|
178
|
+
installation with its host's `plugin remove fvs@beneficial-ai-foundation` command.
|
|
394
179
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
180
|
+
If you use the skills CLI, set both `DISABLE_TELEMETRY=1` and `DO_NOT_TRACK=1` before invoking it.
|
|
181
|
+
Later setup consent cannot cover earlier analytics. The opt-out also disables the CLI's external
|
|
182
|
+
audit lookup, so retain independent source and integrity checks. See the [skills CLI FAQ](https://www.skills.sh/docs/faq)
|
|
183
|
+
and [privacy policy](https://vercel.com/legal/privacy-policy). The `fvs-setup` entry provides native
|
|
184
|
+
installation guidance; copying it alone does not install the full FVS workflows.
|
|
398
185
|
|
|
399
|
-
|
|
186
|
+
## Credits and license
|
|
400
187
|
|
|
401
|
-
|
|
188
|
+
FVS adapts documentation and proof skills from [Aeneas](https://github.com/AeneasVerif/aeneas)
|
|
189
|
+
(Apache 2.0; [retained upstream documentation](fv-skills/upstream/aeneas/)). Its distribution
|
|
190
|
+
architecture follows [GSD Core](https://github.com/open-gsd/gsd-core). We also use
|
|
191
|
+
[probe-aeneas](https://github.com/Beneficial-AI-Foundation/probe-aeneas) and recommend
|
|
192
|
+
[lean-lsp-mcp](https://github.com/oOo0oOo/lean-lsp-mcp). The Lake reference credits its source talk.
|
|
193
|
+
[Jin Xing Lim](https://github.com/jinxinglim) proposed independent crypto-plan review and its reviewer prompt.
|
|
402
194
|
|
|
403
|
-
MIT
|
|
195
|
+
MIT. See [LICENSE](LICENSE).
|