<?xml version="1.0" encoding="UTF-8"?>
<spec xmlns="https://vibevm.org/spec/1">
  <title id="root">AI-Native Rust (Discipline v0.2) — boot snippet</title>
  <status stage="impl" state="done"/>
  <p p="1"><fact id="RUST-CODE-FOLLOWS-THE-RUST-GUIDE" status="impl/done">Rust code in this project follows the AI-Native Rust guide
(`spec/rust/GUIDE-AI-NATIVE-RUST.xml` in this package).</fact></p>
  <p p="2"><fact id="READ-THE-GUIDE-FOR-STRUCTURE" status="impl/done">Read the guide when
authoring or reviewing structure; per-edit work needs only the card
whose trigger fires.</fact></p>
  <p p="3"><fact id="CARD-REGISTRY-FOR-RUST" status="impl/done">Card registry for Rust: `spec/cards/INDEX.xml` in this package (trigger → card;
the nine executable scaffolds A–I in their Rust shape).</fact></p>
  <p p="4"><fact id="STACK-SHIPS-ITS-OWN-CARDS-PROJECTION" status="impl/done">This stack ships
its own `spec/cards/` projection — the weak-reader runtime surface for a `.rs`
edit is a Rust card's Band-3 ops block, never another language's.</fact></p>
  <p p="5"><fact id="standing-rules-lead" status="impl/done">Standing rules at the surface level:</fact></p>
  <list ordered="false" p="6">
    <item><fact id="RULE-ORDINARY-IDIOMATIC-RUST-SURFACE" status="impl/done">Ordinary idiomatic Rust at the token level — no invented dialect.
  Strictness lives in the envelope: newtypes/typestate at seams,
  runnable contracts at use sites, `#[spec]` metadata, per-cell
  fast verification (`cargo test -p &lt;cell&gt;`, &lt; ~60s).</fact></item>
    <item><fact id="RULE-CELLS" status="impl/done">Cells: one cell = one file-set, single registration point; cells
  import seams + core only, never sibling cells. Ambient coupling is
  forbidden.</fact></item>
    <item><fact id="RULE-ERROR-ENUM-PER-LAYER" status="impl/done">One `thiserror` enum per layer; error messages cite the violated
  `spec://` REQ and a fix surface. `unwrap`/`expect` in domain logic
  is forbidden by default — escape hatch is
  `#[spec(deviates, reason)]` with machinery.</fact></item>
    <item><fact id="RULE-DOCTEST-PER-SEAM" status="impl/done">Every public seam carries one compiled doctest of canonical use.
  Replacing a non-trivial cell requires a differential oracle.</fact></item>
    <item><fact id="RULE-UNIFORMITY-IS-LOAD-BEARING" status="impl/done">Uniformity is load-bearing: one idiom per operation; exceptions
  are marked, or they propagate as false training signal.</fact></item>
  </list>
  <p p="7"><fact id="shipped-toolchain-lead" status="impl/done">The shipped toolchain (this stack materialises it; no dev tree needed):</fact></p>
  <list ordered="false" p="8">
    <item><fact id="TOOLCHAIN-RUST-AI-NATIVE-UMBRELLA" status="impl/done">`rust-ai-native` — `init` (bootstrap policies + registries), `floor`
  (fmt→test→clippy→conform→specmap→test-gate, one exit code), `health`
  (the sweep's fact collector), `test-gate` / `tripwire` / `trace` /
  `fast-loop` / `codemod` / `ledger`;</fact></item>
    <item><fact id="TOOLCHAIN-NARROW-ENGINES" status="impl/done">plus the narrow `rust-ai-native-conform` and
  `rust-ai-native-specmap` engines,</fact></item>
    <item><fact id="TOOLCHAIN-AGENTIC-TYPE-ORACLE" status="impl/done">and the agentic type oracle `rust-ai-native-tcg`
  (also served over MCP by `mcp:org.vibevm.ai-native/rust-ai-native-mcp` — PROP-027)
  (persistent enriching `serve` relay + one-shot
  `validate`/`scope`/`complete`/`type`/`bench`: check an edit against
  in-memory overlays BEFORE writing it, answered by the CONSUMER's own
  rust-analyzer with the SAME conform rules as the gate — GUIDE §12, §13
  move 8; prerequisite `rustup component add rust-analyzer`; honesty:
  the oracle approximates, the floor stays the truth).</fact></item>
  </list>
  <p p="9"><fact id="RUN-VIBE-NATIVELY-FROM-PATH-OR-IN-PLACE" status="impl/done">Run vibe-natively
(`vibe bin exec rust-ai-native -- &lt;args&gt;` — PROP-025 lockfile
dispatch; `vibe bin build` pre-builds), from PATH (`cargo install
--path vibedeps/&lt;stack-slot&gt;/crates/rust-ai-native-cli`), or in place
via `cargo run --manifest-path vibedeps/&lt;stack-slot&gt;/Cargo.toml -p
rust-ai-native-cli --bin rust-ai-native -- &lt;args&gt;`.</fact></p>
  <p p="10"><fact id="wiring-and-sweep-pointers" status="impl/done">Wiring recipe:
GUIDE §13; sweep idioms: GUIDE §14.</fact></p>
  <p p="11"><fact id="PROCEDURES-AS-AGENT-SKILLS" status="impl/done">Procedures as agent skills:
`/rust-ai-native-sweep` (recurring), `/rust-ai-native-terraform` (brownfield
adoption) — `vibe skill install` projects them.</fact></p>
</spec>
