/fvs:aeneas-extract <path>from fvs
Drives a Rust crate through the Aeneas extraction repair loop with bounded iterations, resolving verification issues. Useful for formal verification workflows.
Ships in fvs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
<plugin_runtime>
${CLAUDE_PLUGIN_ROOT}; hosts expand this placeholder in plugin skill content..formalising/).
</plugin_runtime><codex_skill_adapter> This block applies only when this shared skill runs in Codex. Claude Code must ignore it and use the shared workflow body with its native slash-command, question, and subagent semantics.
$fvs:aeneas-extract.$fvs:aeneas-extract as {{FVS_ARGS}}.{{FVS_ARGS}} as empty.FVS workflows use AskUserQuestion (Claude Code syntax). Translate to Codex request_user_input:
Parameter mapping:
header -> headerquestion -> question"Label" -- description -> {label: "Label", description: "description"}id from header: lowercase, replace spaces with underscoresBatched calls:
AskUserQuestion([q1, q2]) -> single request_user_input with multiple entries in questions[]Multi-select workaround:
multiSelect. When a question allows multiple selections, do NOT collapse it to a single choice. Use sequential single-selects, or present a numbered freeform list asking the user to enter comma-separated numbers, then collect every selection before proceeding.Execute mode fallback:
request_user_input is rejected or unavailable (Execute mode), present every AskUserQuestion call as a plain-text numbered list, then stop and wait for the user's reply. Do NOT pick a default and continue.--auto or --all),
(b) the user has explicitly approved a specific default for this question, or
(c) the workflow's documented contract says defaults are safe (e.g. autonomous lifecycle paths).FVS workflows use Task(...) (Claude Code syntax). Translate to Codex collaboration tools:
Delegation authorization: Invoking this skill is the user's explicit request for the sub-agent delegation this workflow specifies. Each Task(...) dispatch in the workflow body, including every pass of a loop, is a skill instruction to spawn a sub-agent with spawn_agent when the workflow reaches that step; do not wait for the user to ask for sub-agents again, and do not perform a delegated role inline in this session. If spawn_agent is not visible, discover it with tool_search first. If sub-agents remain unavailable or disabled, stop before that dispatch, tell the user why, and offer only the workflow's documented alternatives (such as a documented --codex runner).
Schema detection (required first step): Inspect the visible spawn_agent schema. It may have agent_type or be generic (no agent_type); inspect model and reasoning_effort fields independently rather than assuming either exists. An available agent_type field does not establish that a particular FVS role is registered.
Before spawning, inspect the spawn_agent tool's visible parameter schema to determine which form is active.
Requested specialist gate (at dispatch only): When a workflow requests a named FVS specialist, check BOTH the visible spawn_agent schema and whether the exact requested agent_type is advertised there or in a confirmed runtime registry. An agent_type field alone is not evidence that this role is registered; bundled agents/*.md are instructions, not registered Codex specialists. If the exact role is registered and agent_type is available, use typed mapping below WITHOUT a missing-role warning. Otherwise, even if agent_type is present, warn the user in plain language: Requested FVS specialist is not registered in this Codex session; the bundled Markdown cannot supply typed identity. Do not warn merely for opening help, installing, or mentioning a skill without requesting specialist dispatch. Apply the settings gate below before considering the generic-agent workaround. Never run an installer on the user's behalf.
Selection-capability gate (before manifest confirmation, child dispatch, or artifact writes):
sandbox_mode, so the child runs in the parent session's sandbox. Report that sandbox as the child's, never the role file's value, and never call a child read-only when the parent session can write.model is exposed for this child, pass the requested model. Otherwise compare it with the exact active/inherited Codex model; a different or unconfirmed model is unresolved. Rebuild the manifest around confirmed settings and ask explicitly, choose a capable external runner, or fail before dispatch in noninteractive mode.reasoning_effort is exposed for this child, pass the requested effort. Otherwise compare it with the confirmed effective installed/runtime default; a different or unconfirmed effort is unresolved and follows the same rebuild/ask-or-fail rule.model or reasoning_effort (its role description says the setting is locked, or its TOML sets it) overrides the per-call value, so the pinned value is the effective one; if it differs from the confirmed selection it is unresolved.Typed mapping (only when the exact requested FVS role is registered AND agent_type is exposed):
Task(subagent_type="X", prompt="Y") -> spawn_agent(agent_type="X", message="Y")Task(model="...") -> pass model if available for this child; otherwise omit only after the selection-capability gate proves it equals the active/inherited model.Task(reasoning_effort="...") -> pass reasoning_effort if available for this child and the role does not pin it; otherwise omit only after the gate proves the effective (pinned or default) effort equals the confirmed effort.Generic-agent workaround (missing exact registered role OR no agent_type field):
If the requested FVS type (fvs-researcher, fvs-executor, etc.) is not registered, typed dispatch is NOT possible even with an agent_type field. If the field is absent, typed dispatch is also unavailable. Fallback:
${CLAUDE_PLUGIN_ROOT}/agents/<agent-name>.md and extract its instructions. If the token is still literal, resolve the path from this SKILL.md as described above.agent_type.Fresh context (typed and generic dispatch): FVS children start without the parent conversation; put every input the child needs in its message (FVS workflow prompts already inline them). If the schema exposes fork_turns, pass fork_turns: "none" (omitting it or passing "all" forks the full history, which also refuses model and reasoning_effort overrides); if it exposes only fork_context, pass fork_context: false. If neither is exposed, fresh context is unconfirmed: say so before dispatch, and stop where the workflow requires a fresh child.
Parallel fan-out:
wait_agent(timeout_ms=...) (or the runtime's visible wait equivalent) until each completesResult parsing:
CHECKPOINT, PLAN COMPLETE, SUMMARY, etc./fvs:<name> references as $fvs:<name>.$ARGUMENTS in the shared body as {{FVS_ARGS}}.${CLAUDE_PLUGIN_ROOT} is the installed plugin root. If a host leaves that token unexpanded, resolve the plugin root as two directories above this SKILL.md.</codex_skill_adapter>
Drive a Rust crate, folder, or single source file through the bounded Aeneas extraction repair loop and either reach a clean build or escalate the remaining blockers to the human.This command is the ORCHESTRATOR. It owns loop termination, fires the synchronous Category-B equivalence gate itself (never delegating gate-firing to a subagent), and runs the success oracle. The loop subagents do the bounded work (classify, apply, bisect, assess, draft); the orchestrator routes their results and enforces the hard invariants.
Output: a clean extraction (or a documented escalation), reversible source records at the
crate root (src-modifications.diff + derived .json + src-modifications.md +
src-assumptions.md), and the workspace tree under the resolved extract_workspace.
<execution_context> @${CLAUDE_PLUGIN_ROOT}/fv-skills/workflows/aeneas-extract.md @${CLAUDE_PLUGIN_ROOT}/fv-skills/references/extraction-safety-model.md @${CLAUDE_PLUGIN_ROOT}/fv-skills/references/blocker-catalog.md @${CLAUDE_PLUGIN_ROOT}/fv-skills/references/model-profiles.md @${CLAUDE_PLUGIN_ROOT}/fv-skills/references/ui-brand.md </execution_context>
Target path: $ARGUMENTS (required -- a crate root with Cargo.toml, a module folder, or a single source file).The loop is restartable from its own on-disk records. If a prior run was paused at a gate, an
escalation, or a session handoff (/fvs:pause-work + /fvs:resume-work), re-running on the
same target resumes from the reversible records at the crate root -- re-extraction is
idempotent and skips already-clean blockers. There is no separate status/resume command.
Read the complete project config and apply the canonical resolution contract in
model-profiles.md. Declare these stage keys rather than deriving tiers from agent names:
fvs-extract-classifier -> extract_classifyfvs-extract-applier -> extract_applyfvs-extract-bisector -> extract_bisectfvs-equivalence-assessor -> extract_assessfvs-draft-investigator -> extract_investigateResolve model and effort independently for every distinct stage. Before the first dispatch, show
one command-level selection manifest and obtain confirmation. Adjust once changes only this run;
Save override writes the exact runtime+stage entry. Notes rebuild the manifest and require
reconfirmation. Missing preferred models or unsupported efforts prompt interactively and fail with
exact remediation in noninteractive mode. Pass only validated native model/effort fields.
Follow the PRE-FLIGHT step of the workflow:
crate if <path>/Cargo.toml exists, else folder if a
directory, else file) and resolve the crate ROOT. Quote every path expansion, reject a
path with shell metacharacters, never eval a path.charon_clone_path / aeneas_clone_path / extract_workspace with the precedence
config -> auto-detect -> prompt -> error. Never hardcode an absolute clone path. Validate a
resolved clone path is a directory before any git -C <clone>.charon-pin (strip comments/whitespace) and compare
against the Charon clone HEAD, the project lakefile.toml rev, and the known-good anchor.
On ANY drift, report loudly which pins moved and whether a fix may/may-not be in the pinned
Charon, then HALT for explicit user confirmation (warn-and-confirm: never silent, never a
hard block) and record the acknowledgment as pin_context.up-to-date / behind N / ahead N / diverged).Initialise the workspace tree <extract_workspace>/<target>/ with subdirs equivalence-gate/,
mwe/, drafts/, catalog-candidates/, escalations/.
Run the mandatory cache preflight from the validated Lean project root. A failure stops the workflow before extraction, delegation, or build:
if { [ ! -f lakefile.lean ] && [ ! -f lakefile.toml ]; } || [ ! -f lean-toolchain ]; then
echo "FVS >> ERROR: run from the Lean project root" >&2
exit 1
fi
LEAN_NUM_THREADS="${LEAN_NUM_THREADS:-4}" nice -n 19 lake exe cache get
CACHE_STATUS=$?
if [ "$CACHE_STATUS" -ne 0 ]; then
echo "FVS >> ERROR: Lake cache preflight failed; stopping workflow" >&2
exit "$CACHE_STATUS"
fi
Repeat EXTRACT -> CLASSIFY -> DISPATCH -> DOCUMENT until clean or escalated, enforcing the
loop bounds (per-blocker attempt-cap 3, per-run cycle hard-cap ~25, bisection variant-budget
~12, no-progress key sha256(layer || signature) -- a same-key recurrence after an applied
fix escalates immediately).
Fresh child per pass: every pass or round of this loop that delegates work dispatches a new child of the role named here, with the current inputs and the confirmed settings; the parent never performs that role's work itself. Wait for the child's terminal result through the runtime's normal wait or notification; a spawn acknowledgement or progress message is not a result. If the dispatch fails, the child cannot be confirmed, or it ends in a terminal error, stop and report the affected pass. Valid results such as a failed build, NOVEL, REJECT, REVISE or FOLLOWUP still route as this step describes, and parent-owned baseline, build, revert and report steps stay with the parent.
set -o pipefail + LEAN_NUM_THREADS="${LEAN_NUM_THREADS:-4}" nice -n 19 lake build;
read the tool's real exit status via ${PIPESTATUS[0]}, never the tail of a piped log.
Clean -> success oracle (Step 5). Failure -> classify.Task(subagent_type="fvs-extract-classifier", model="$CLASSIFIER_MODEL", reasoning_effort="$CLASSIFIER_EFFORT", ...)
-> { layer, symbol, signature, match }.Task(subagent_type="fvs-extract-applier", model="$APPLIER_MODEL", reasoning_effort="$APPLIER_EFFORT", ...).
The coverage-escalation guard: A-opacity on a function inside required coverage is NOT
auto-applied -- it becomes Category-B and routes to the gate.Task(subagent_type="fvs-extract-bisector", model="$BISECTOR_MODEL", reasoning_effort="$BISECTOR_EFFORT", ...) to
minimize to an MFE, write a schema-conformant candidate, and PROPOSE a fix.src-modifications.diff (regenerated against the pin), src-modifications.md,
src-assumptions.md, and the DERIVED src-modifications.json (hunk -> M-entry ->
classification -> ratification-token mapping). Generated Types.lean/Funs.lean are NEVER
written; annotations are preferred over edits.When DISPATCH yields a Category-B change, THIS command body fires the synchronous gate -- never a fixing subagent:
The proposer (the bisector or proposing agent) supplies section 1 of the packet (the minimized diff).
Dispatch the DISTINCT assessor to draft sections 2-6 (the gate independence is structural -- the assessor is a different agent from the proposer and never writes the token):
Task(subagent_type="fvs-equivalence-assessor", model="$ASSESSOR_MODEL",
reasoning_effort="$ASSESSOR_EFFORT", // when supported; otherwise apply the capability gate
description="Draft equivalence-gate packet sections 2-6",
prompt="...minimized diff (section 1) + the blocker context...")
This fvs-equivalence-assessor dispatch is deliberately distinct from the
fvs-extract-bisector dispatch above.
HALT and present the rendered 7-field packet to the human (write it to
<extract_workspace>/<target>/equivalence-gate/<change-id>.md). Wait for the human to stamp
section 7 and the ratification token. Use AskUserQuestion to present the halt; on Codex,
degrade to a plain-text question and WAIT (fail-closed -- never auto-pick a default, never
self-ratify).
Re-extract only once the token equivalence-ratified: is present. Reject -> record the
reason and ESCALATE; never re-submit the identical change.
Mark the run complete only when ALL of:
0, read via ${PIPESTATUS[0]}).grep -l "equivalence-ratified:" <extract_workspace>/<target>/equivalence-gate/*.md
matches for each B-change. Refuse completion while any token is absent.src-modifications.diff maps to an entry
in src-modifications.json.If any clause fails, the run is not complete -- continue the loop or HALT for the human.
On any escalate condition: persist the blocker to
<extract_workspace>/<target>/escalations/<id>.md with the signature, the symbol (fix site),
the attempt history, and the MFE; surface it to the user; and OFFER a draft. Drafting runs
ONLY on the user's acceptance -- on acceptance dispatch the draft-investigator:
Task(subagent_type="fvs-draft-investigator", model="$DRAFT_MODEL",
reasoning_effort="$DRAFT_EFFORT", // when supported; otherwise apply the capability gate
description="Mine precedent + draft an evidence-cited HTML+MD report",
prompt="...the MFE + the escalation context...")
The draft is HTML+MD written to the workspace drafts/ directory ONLY. No upstream artifact
is auto-opened or auto-created from any draft step. "skip and continue" is ONLY an explicit
human choice; escalation is a valid outcome, not a failure.
FVS >> EXTRACTION RUN COMPLETE
Target: {target} ({shape})
Build: {clean | escalated}
B-changes: {N} ratified
Escalations: {M} outstanding (re-offer drafts: {ids})
Pin context: {pin_context summary}
Records: src-modifications.diff / .json / .md, src-assumptions.md (crate root)
Re-remind the user of outstanding escalations and re-offer drafting; note that a later run on the same target re-surfaces them from their on-disk records.
<codex_skill_adapter> On Codex, every interactive HALT in this command -- the pin-audit warn-and-confirm (Step 2), the Category-B gate presentation (Step 4), and the escalation draft offer (Step 6) -- degrades to a plain-text question and WAITS for the user. It is fail-closed: it never auto-picks a default, never self-ratifies a gate packet, and never writes an upstream artifact. The Before any Codex dispatch, apply the model-profile capability gate: confirm only the actual active/inherited model and applicable effort, or fail before dispatch. Never silently ignore a confirmed field. </codex_skill_adapter>
<success_criteria>
<path> auto-detected into crate/folder/file; the loop scoped accordingly.pin_context; clone staleness reported gracefully.set -o pipefail / ${PIPESTATUS[0]}); always LEAN_NUM_THREADS="${LEAN_NUM_THREADS:-4}" nice -n 19 lake build.fvs-equivalence-assessor distinctly from fvs-extract-bisector; the success oracle greps equivalence-ratified: and refuses completion without it.gh open/create call anywhere in the command or the draft path.
</success_criteria>What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fvs@beneficial-ai-foundation is listed by beneficial-ai-foundation/plugins — review the source before installing
npx claudepluginhub beneficial-ai-foundation/plugins --plugin fvs36 skills in this plugin
/configureConfigure runtime-aware FVS stage models, effort levels, and review defaultsOther plugins' skills for the same job