How to reason about it
lispex [FILE|-]evaluates source;receiptrecords the native execution envelope;lowerandeval-graphoperate on the checked subset.- Native
lispex fmt [FILE|-]writes deterministic formatted source to stdout.--checkis silent and exits 0 when no change is needed or 1 when formatting would change bytes.--writesafely replaces one regular named file. Validation happens first; comments, pragmas, tokens, and literal spellings stay exact. - Native
core-ir buildturns exact source into canonical resolvedlispex.core-ir/v1;core-ir validatestrictly reads and re-encodes it;core-ir inspectadds a readable normalized projection. All three are non-executing andintegrity-only. Existinglowerremains the separate Meaning Graph command. - Native
bytecode buildaccepts strict Core IR and writes canonicallispex.bytecode/v1;inspectandvalidatestrictly read it without executing;bytecode runverifies and executes it inlispex-rust-vm/v1.run --backend rust --engine vmis the in-memory source route, while tree remains the default. A VM error never retries through tree. - Native
vouch compiled build|inspect|validatecreates, structurally checks, or exactly re-derives one.lpxvcafrom a separately named source or proved image. The three commands print JSON to stdout, never execute, and reportauthority: integrity-only.verify --reexecute --compiled-artifactandgate --compiled-artifactare the only opt-in execution consumers. compare-engines --receipt REPORT SOURCEruns both Rust engines, writes a no-clobberlispex.rust-engine-comparison/v1report, and exits 1 when a semantic mismatch axis exists. It is same-lineage regression evidence, not an independent receipt or authority.bytecode run --engine topaz --topaz-vm ROOTselects only the exact separately installed macOS ARM64 Topaz 5.11 provider.compare-vms --topaz-vm ROOT --receipt REPORT SOURCEderives bytecode once and records both VM observations. Product, request, result, full-u64resources, and fallback counters are checked; no Topaz failure retries another engine.- Native
aot buildlowers exact source through Core IR and bytecode to readable Topaz, then requires absolute exact Topaz and Rust tool paths and a new output directory.aot inspect|validatenever execute;aot runnever compiles. The source-free macOS ARM64 product and every result are no-fallback andexecution-material-only. compare-routes --topaz-vm TVM --aot-product AOT --receipt REPORT SOURCEderives one Core IR and bytecode request, proves the AOT product matches it, validates both installed Topaz products, and explicitly runs tree, Rust VM, Topaz VM, and AOT. Its no-clobber diagnostic receipt separates semantic mismatch axes from comparable resource axes and cannot enter Vouch.- Native provides the full namespaced chain:
vouch issue, flag-freevouch verify,vouch verify --reexecute,vouch gate --require-decision, andvouch inspect. npm provides authenticated flag-freevouch verify, structuralvouch inspect, and corpusvouch replay; npm rejects issue,--reexecute, and gate before artifact I/O. - For flag-free authenticated verify, exits are 0 for authenticated and diagnostic-promotion-eligible, 10 for authenticated but diagnostic-promotion-ineligible, 1 for rejection, 2 for usage before artifact I/O, and 3 for input/output or report-publication failure. Both 0 and 10 authenticate; neither grants authority.
- The flat npm
lispex verify RECEIPTremains an unsigned structural compatibility command. It is not an alias for namespaced authenticatedlispex vouch verify. - A successful
--reexecutereport hasauthentication.statusset toauthenticated,reexecution.statusset toexecution-agreed, fixedobservation_scopecsk.vouch-complete-transcript/v0, andcomparison.current_vs_signedset toagree. vouch gaterequires all raw context paths plus--require-decision approve|deny|review|invalid-inputand--report-out. Itscsk.native-gate-report/v0separates authentication, re-execution, and gate status and records the fixed basiscsk.current-native-agreement/v0.- File and stdin identities are recorded explicitly where an artifact contract requires them.
- Use
lispex vouch policy createwith one named SPKI file, repeated explicit engine/source flags, and a new output; then usepolicy checkon the exact bytes. Success emits no stdout. Exit 2 is usage, 3 is I/O/resource/publication failure, and 1 is invalid configuration. - For Native bundle authority,
vouch verify --reexecuteandvouch gaterequire both--source RULEand--input INPUT. Missing or partial pairs are usage exit 2 before any named artifact is opened. Flag-freevouch verify --bundleremains supported authentication-only behavior in Native and npm. - Native and npm image commands use named paths:
image encode --source SOURCE --out IMAGE,image inspect --image IMAGE,image decode --image IMAGE --out SOURCE, andrun --image IMAGE. Encode requires.lspx.pngfor one page or.lspx-images.zipfor a page set. Image usage errors exit 2, validation or suffix failures exit 1, and I/O, resource, or no-clobber publication failures exit 3. - Where a Vouch command accepts source context, choose exactly one of
--source RULEor--source-image IMAGE. A source image is read under the image bound and fully proved before recovered bytes enter identity, policy, issuance, authentication, request binding, re-execution, or gate evaluation. - For pinned bundle verify, Native re-execution, and gate,
--source-image IMAGEstill requires the separately supplied--input INPUT. An unpinned bundle remains authentication-only and cannot reach execution or a grant.
Command boundaries
| Command | Reads | Writes / does not establish |
|---|---|---|
| lispex [FILE|-] | Lispex source bytes | canonical result/stdout and diagnostics; no receipt |
| lispex fmt [--check|--write] [FILE|-] | valid UTF-8 Lispex source | formatted source, a quiet status, or safe in-place replacement; no execution |
| lispex receipt FILE | source bytes | native execution receipt; not a Vouch differential receipt |
| lispex core-ir build --source S --out O | exact source bytes | canonical resolved Core IR plus a named-file report; does not execute or grant authority |
| lispex core-ir validate --ir IR | canonical Core IR bytes | strict validation summary; no execution |
| lispex core-ir inspect --ir IR | canonical Core IR bytes | readable resolved projection and identities; report is not an executable artifact |
| lispex bytecode build --ir IR --out O | strict canonical Core IR | canonical verified .lpxbc bytes and named-file summary; no execution or authority |
| lispex bytecode inspect --bytecode BC | canonical bytecode | identities, counts, requirements, opcodes, roots, and source-map coverage; no execution |
| lispex bytecode validate --bytecode BC | canonical bytecode | strict decode, verify, and re-encode result; no execution |
| lispex bytecode run --bytecode BC [--input I] | verified bytecode and optional one-datum input | ordinary VM stdout, warnings, or diagnostic; no Vouch authority |
| lispex bytecode run --engine topaz --topaz-vm ROOT --bytecode BC [--input I] | exact installed Topaz product, verified bytecode, and optional datum | bounded Topaz observation; no discovery, fallback, or Vouch authority |
| lispex run --backend rust --engine tree|vm FILE | Lispex source | selected Rust execution; tree default, no VM fallback |
| lispex compare-engines --receipt R FILE | Lispex source | exact same-lineage tree/VM comparison report; no-clobber and non-authoritative |
| lispex compare-vms --topaz-vm ROOT --receipt R FILE | source plus exact installed Topaz product | no-clobber Rust/Topaz comparison; differential evidence only |
| lispex aot build --source S --topaz-compiler T --rust-tool-bin R --out O | exact source and exact absolute build tools | closed source-free Native product; no overwrite, fallback, or Vouch authority |
| lispex aot inspect|validate --product P | absolute installed AOT product | strict non-executing inventory and identity result |
| lispex aot run --product P [--input I] [--json] | already installed product, optional datum, canonical u64 limits | direct executable observation; no compile, discovery, fallback, or authority |
| lispex compare-routes --topaz-vm TVM --aot-product AOT --receipt R [--input I] SOURCE | one exact source/input request and both exact installed Topaz products | no-clobber four-route receipt; checked semantic/resource axes, visible lineage/fallback, no retry or Vouch authority |
| lispex vouch compiled build (--source S|--source-image IMG) --out A | exact source bytes | canonical no-clobber .lpxvca plus JSON summary; no authentication, execution, or authority |
| lispex vouch compiled inspect --artifact A | canonical container and embedded verified bytecode | integrity summary; derivation not checked and execution not run |
| lispex vouch compiled validate --artifact A (--source S|--source-image IMG) | container plus separately supplied exact source | exact source→Core IR→bytecode derivation result; no authentication, execution, or authority |
| lispex vouch verify ... --reexecute --compiled-artifact A | authenticated, externally pinned request plus exact derived artifact | csk.native-compiled-reexecution-report/v1; current tree/Meaning and verified VM agreement, not a grant |
| lispex vouch gate ... --compiled-artifact A | same live compiled evidence plus required decision | csk.native-compiled-gate-report/v1; live local grant/denial, while the report remains non-capability output |
| lispex diff-receipt --input I RULE | checked-profile rule and datum | csk.differential-receipt/v0; not authenticity |
| lispex verify RECEIPT | receipt JSON and optional source | consistency verdict; does not re-run policy |
| lispex issue-native ... | checked-profile rule, pinned input, profile, and local PKCS#8 key handle | atomic payload, DSSE envelope, and issue report; native release binary only |
| lispex verify-native ... | DSSE envelope, consumer trust policy, source, input, profile, and expected engine context | authentication report for exact checked context; no identity, time, deployment, or policy-correctness proof |
| lispex verify-bridge REPORT | Bridge report and bound artifacts | Bridge consistency verdict; no external-engine execution |
A common mistake
fmt does not canonicalize literal values and does not execute the program.
2/4, 1.00, comments, and ;! pragmas retain their spelling. Malformed
source is reported before stdout or file replacement. Formatting is
Native-only; the editor extension never falls back to npm, WASM, or the
Playground.
For Core IR commands, exit 0 means the requested build or strict read succeeded, not that a rule ran. Usage errors exit 2, validation or source errors exit 1, and resource or input/output publication failures exit 3.
For bytecode, exit 0 means build/strict validation/inspection or execution succeeded. Invalid Core IR, malformed bytecode, invalid input, and ordinary runtime diagnostics exit 1; usage and engine/resource failures exit 2; named artifact/input I/O, bounded-ingress, or named output/report publication failures exit 3. A terminal write failure while emitting an execution result exits 2. Artifact stdout is byte-clean, named outputs never clobber, and bytecode plus input cannot both read stdin.
Topaz mode additionally requires an absolute product root and is available
only for the admitted macOS ARM64 product. Provider identity, timeout,
malformed result, resource, and mismatch failures exit visibly without
running Rust, tree, LIL, LIT, or another Topaz installation. npm explicitly
rejects core-ir, bytecode, aot, compare-engines, compare-vms, and
compare-routes as Native-only commands instead of treating them as source
filenames.
For vouch gate, exit 0 means a live grant matched the required decision; 10 means authentication succeeded but no grant was minted; 1 means authentication rejection; 2 means usage error; and 3 means I/O, execution, or report-publication failure. A report is diagnostic output and cannot be reused as gate input.
For vouch compiled, exit 0 means build, canonical inspection, or exact
derivation validation succeeded. Invalid source/profile/container/bytecode or
derivation mismatch exits 1; duplicate, missing, conflicting, or unknown flags
exit 2 before artifact work; bounded input/output and no-clobber publication
failures exit 3. Build never overwrites an existing output. Inspect does not
check source derivation; use validate with the exact source for recovery.
--compiled-artifact without --reexecute is usage exit 2.
Keep going
Use this page while writing code. For a guided explanation, return to the syntax map or the corresponding manual.
Bytecode and Rust VM · Core IR Contract · Choosing a Runtime Surface