.agents/skills/migrate/SKILL.md
Use when asked to migrate to a feature flag or roll out a manifest-gated acornlib certificate/build-cache or proof-format change. This skill covers feature-flag migrations, including the state-machine workflow for verifier, proof, and cache migrations.
npx skillsauth add acornprover/acorn migrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Perform a safe rollout for feature-flag migrations and other breaking acornlib/certificate format changes.
cargo run ... commands from the acorn repo.acornlib repo as ../acornlib relative to the acorn repo root.../acornlib/src.status, log, show, diff, etc.).add, commit, push, pull, merge, rebase, cherry-pick, reset, checkout).../acornlib/build/* must be run with escalated permissions.git -C ../acornlib status --short.For any step that is expected to update ../acornlib/build:
git -C ../acornlib status --short.Before running the migration state machine:
cargo testcargo test --features <feature>Treat migration as a state machine. Do not skip states. Do not run commands from later states early.
verify is an immediate transition to S_blocked_feature_bug.Preconditions:
--features <feature>.Transition command:
cargo run --profile release --features <feature> -- checkOutcomes:
S_done_no_migration.S1_enable_manifest_gate.When entered:
S0 feature-mode check fails.Required change:
#[cfg(feature = "<feature>")]
const MANIFEST_VERSION: u32 = N + 1;
#[cfg(not(feature = "<feature>"))]
const MANIFEST_VERSION: u32 = N;
Rule:
jsonl) in old format during migration loop.Next state:
S2_probe.Purpose:
Required command:
cargo run --profile release --features <feature>,validate -- verify --ignore-hash --read-only --fail-fastOutcomes:
S4 (ready for review, then flag flip).S3_probe.S_blocked_feature_bug. Do not inspect/edit proofs after the panic.Hard guard:
Purpose:
S2 failure.Actions:
cargo run --profile release -- verify <module> --ignore-hash --read-only --fail-fastcargo run --profile release --features <feature> -- verify <module> --ignore-hash --read-only --fail-fastOutcomes:
S3_edit.S2_probe.S_blocked_feature_bug. Do not continue the migration loop.Purpose:
Actions:
cargo run --profile release -- select MODULENAME LINENUMBER../acornlib/src using the edit tool.by block if target line has one.Next state:
S3_check.Purpose:
Required commands:
cargo run --profile release -- verify <module> --ignore-hash --read-only --fail-fastcargo run --profile release --features <feature> -- verify <module> --ignore-hash --read-only --fail-fastConditional command:
../acornlib/src for this module:
cargo run --profile release -- verify <module> --ignore-hash --fail-fastgit -C ../acornlib status --short.Permission note:
../acornlib/build but no files change, do not continue; rerun with escalated permissions and re-check write evidence.Outcomes:
S3_decide.S3_edit.S3_edit.S_blocked_feature_bug. Do not continue proof edits for that target.Purpose:
Required command:
cargo run --profile release --features <feature> -- verify --ignore-hash --read-only --fail-fastOutcomes:
S4.S3_probe.S_blocked_feature_bug.S_blocked_feature_bug. Do not continue migration work in S3_*.Hard guard:
S3_* states, feature-mode check may fail on old cert format. Do not use it as pass/fail.S3_* states, do not use validate as the iterative proof-migration driver. The proof-edit loop optimizes for fast repro and shaping, not prover-internals checking.S2 probe and before claiming success in S4.Blocked-condition diagnostics (required when entering S_blocked_feature_bug):
Entry conditions:
S2 success after:
check failedRequired:
cargo run --profile release -- verify --ignore-hash --read-only --fail-fast../acornlib/src proof changes, human reviews them and then merges/pushes upstream first.Next state:
S5_flip_default only after review approval and upstream acornlib updates are in.Preconditions:
acorn is up to date with master.acornlib is up to date with master (including any reviewed migration proof edits from S4).Actions:
acorn.cargo run --profile release -- verify --ignore-hashcargo run --profile release --features validate -- checkPermission note:
git -C ../acornlib status --short.Next state:
S6_deploy_readyMeaning:
Actions:
Required report:
S6_deploy_readyMeaning:
S3_probe/S3_edit/S3_check/S3_decide) is blocked by a likely feature bug.Required report:
S_blocked_feature_bugS3 blocked-condition exitMeaning:
check succeeded in S0.Required report:
S_done_no_migrationcargo run --profile release --features <feature> -- checkAfter each state transition, report:
Never report progress without naming the current state.
tools
Use when asked to profile Acorn prover or verifier performance, investigate where time is spent, or generate a top-down runtime breakdown from `perf` or `samply`.
development
Use when a proof/module verifies in baseline mode but reproving under a prover-affecting feature flag fails. Add explicit proof detail based on the working baseline proof until `cargo run --features <feature> -- verify ...` succeeds.
tools
Profile the prover and generate a top-down performance summary
databases
Install ONNX Runtime for the ort crate in a sandboxed environment