compiler: only require a TCP profile for passes that consume it (#101)
aot-compile hard-required a TCP profile for every job even when no selected pass reads it — only pass 1 (rewrite-skill) consumes the TCP, so a pass-2-only run (–pass=bind-env, env-setup.sh generation) forced users to profile first for nothing.
CompilerPass gains a declarative requiresTcp; rewrite-skill is the only pass that sets it. PassContext.tcp / CompileOptions.tcp become optional, and compileSkill rejects a requiresTcp pass without a TCP up front, before any workDir side effect. The CLI resolves pass tokens early and skips profile loading entirely when no selected pass consumes the TCP (an explicit –profile is still honored); unknown or zero-token –pass lists are UsageErrors before any side effect. –list-passes grows a tcp column so the –profile help can point at it.
Closes #100
Co-authored-by: Claude Fable 5 noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
SkVM
Compile and run LLM agent skills across heterogeneous models and harnesses
English | 中文
Website · GitHub · Paper
SkVM is a compilation and runtime system that makes LLM agent skills portable across heterogeneous models and harnesses. It has four major parts:
Reference: SkVM: Revisiting Language VM for Skills across Heterogenous LLMs and Harnesses — https://arxiv.org/abs/2604.03088
News
jit-optimizeandjit-boostnow run their internal coding agent via@mariozechner/pi-coding-agentin-process by default. Opencode remains a first-class peer — setheadlessAgent.driver: "opencode"inskvm.config.jsonto keep using it.ProposalMeta.optimizerDriverrecords which driver produced each proposal for replay / audit.claude-codeadapter (drives theclaude -pCLI). Note: heavy headless usage may hit account rate limits or usage-terms issues.Demo
SkVM Optimization: Skill Quality Comparison
SkVM Accelerates Agent Execution
Install
The installer drops a standalone binary at
~/.local/share/skvm/bin/skvm(symlinked into~/.local/bin/skvm) and bundles a private, isolated headless agent runtime used internally byskvm jit-optimize— it is fully self-contained and does not touch any agent or CLI you may have installed globally.Agent-facing skills ship inside the install. Copy them into your agent harness’s skills directory to teach it how to drive skvm:
skvm-jit— post-task JIT optimization skill for submitting conversation logs toskvm jit-optimizeskvm-general— drivesprofile/aot-compile/bench/proposalson behalf of a userQuick Start
Configure your agent harness, provider, and API key via the interactive wizard:
This writes
$SKVM_CACHE/skvm.config.json(default~/.skvm/skvm.config.json). For non-interactive setups, see docs/providers.md.Adapter config mode. External harnesses run in one of two modes:
managed|native(defaultmanaged):hermesconfig.yaml). Clean baseline, no reliance on host state.~/.openclaw/agents/<name>, or a hermes active profile). Requires the harness to be set up locally first.Model id format. Model parameters on the CLI take the form
<provider>/<model-id>— the leading<provider>selects the model service provider, while<model-id>is how that provider refers to the model. For OpenRouter that’s three segments, e.g.openrouter/qwen/qwen3.5-35b-a3b; for the Anthropic native API it’s two, e.g.anthropic/claude-sonnet-4.6.1. Profile a model’s primitive capabilities
Writes a target capability profile to
~/.skvm/profiles/.If your target model + adapter pair is already covered by the pre-built profiles shipped in
skvm-data/profiles/, you can copy the cached result into your local profile cache and skipskvm profileentirely:With the default
--concurrency=1, this example typically takes about 20 minutes for one full run. If you want it to finish faster, increase--concurrencyto profile more primitives in parallel.2. Compile a skill against that profile
The compiler rewrites the skill to match the target’s capabilities. A cached profile for the same
--model+--adapterpair must exist when a selected pass consumes it — only pass 1 (rewrite-skill) reads the profile (runskvm profilefirst, or useskvm pipelinewhich profiles automatically). A compile of only pass 2/3 (e.g.--pass=bind-envforenv-setup.shgeneration) needs no profile; see thetcpcolumn of--list-passes.Compiled variants are written under
~/.skvm/proposals/aot-compile/<adapter>/<safeModel>/<skillName>/<passTag>/by default.3. Autotune the skill with synthetic tasks
The optimizer LLM derives tasks from the skill itself, then loops edit → rerun → score.
By default, synthetic mode generates 2 training tasks and 1 held-out test task.
Results are written under
~/.skvm/proposals/jit-optimize/<adapter>/<safeTargetModel>/<skillName>/<timestamp>/by default.4. Optimize from an existing conversation log
No rerun, just diagnose and edit. Good for post-mortems and for the
skvm-jitpost-task optimization hook.Review, accept, or reject the proposal
Configuration
SkVM keeps all runtime artifacts — cached profiles, proposal trees, bench and compile logs — under a single cache root:
The cache is user-global and shared across every directory you invoke
skvmfrom, so profiles cached in one project are reused everywhere. Override the location via:--skvm-cache=<path>flag (one-off)SKVM_CACHEenv var (persistent), e.g.export SKVM_CACHE=/mnt/fast/skvmIndividual subdirectories can also be pointed elsewhere with
SKVM_PROFILES_DIR,SKVM_LOGS_DIR, andSKVM_PROPOSALS_DIR.Dataset: skvm-data
The benchmark skills, tasks, and pre-built profiles live in a separate Git submodule (SJTU-IPADS/SkVM-data). Clone it if you plan to run
skvm benchand want to use the bundled skills/tasks directly:This populates the
skvm-data/directory:skvm benchresolves skills and tasks fromskvm-data/by default. Override the location via:--skvm-data-dir=<path>flag (one-off)SKVM_DATA_DIRenv var (persistent)Commands that take an explicit
--skill=<path>or--task=<path>do not need the submodule — they work with any directory on disk.skvm-data/profiles/already includes pre-built profiles for some model + adapter combinations. If the pair you need is already there, copyskvm-data/profiles/into your profile cache directory (default:~/.skvm/profiles/, orSKVM_PROFILES_DIRif set) and you can skip runningskvm profilefor that target. See the profile list in the profiling section above for the currently bundled combinations.Learn more
profile,aot-compile,run,bench,jit-optimize,proposals, and moregrade.pytask gradersCitation
If you use SkVM in your research, please cite: