<?xml version="1.0" encoding="UTF-8"?>
<spec xmlns="https://vibevm.org/spec/1">
  <title id="root">AI-Native Go (Discipline v0.2) — boot snippet</title>
  <status stage="impl" state="done"/>
  <p p="1"><fact id="GO-CODE-FOLLOWS-THE-GO-GUIDE" status="impl/done">Go code in this project follows the AI-Native Go guide
(`spec/go/GUIDE-AI-NATIVE-GO.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-GO" status="impl/done">Card registry for Go: `spec/cards/INDEX.xml` in this package (trigger → card;
the nine executable scaffolds A–I in their Go 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
`.go` edit is a Go 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-GO-SURFACE" status="impl/done">Ordinary idiomatic Go at the token level — no invented dialect; the
  language's own prescriptions (gofmt, one idiom culture, errors as
  values) are taken whole. Strictness lives in the envelope: closed
  error sets at seams, loud interface conformance, owned goroutines,
  `//spec:` metadata, per-cell fast verification
  (`go test ./internal/cells/&lt;cell&gt;/ -race`, &lt; ~60s).</fact></item>
    <item><fact id="RULE-CELLS" status="impl/done">Cells: one cell = one package under `internal/cells/&lt;name&gt;` with a
  `New(...)` constructor as the surface; cells import seams + core
  only, never sibling cells. `init()`, blank imports, and package-level
  mutable state are banned in cells; capabilities (clock, env, net,
  fs, randomness) are injected as narrow consumer-side interfaces.
  Every cell carries `var _ Seam = (*Impl)(nil)`.</fact></item>
    <item><fact id="RULE-CLOSED-SEAM-ERROR-SETS" status="impl/done">Each seam owns a closed, enumerated error set (`Code + Spec + Err`,
  `errors.As`-consumed); error messages cite the violated `spec://`
  REQ and a fix surface. Expected failures are never panics; panic is
  the invariant-violation channel only. Exhaustive handling of closed
  const-enum sets is carried by the `exhaustive` linter — the one rule
  a linter carries entirely, named honestly.</fact></item>
    <item><fact id="RULE-OWNED-GOROUTINES" status="impl/done">Every goroutine has an owner (errgroup / WaitGroup + context); naked
  `go` with cell-outliving lifetime is banned; `go test -race` gates
  any package that starts one.</fact></item>
    <item><fact id="RULE-EXAMPLE-PER-SEAM" status="impl/done">Every public seam carries one `Example` function (compiled AND run;
  `// Output:` diffed). Replacing a non-trivial cell requires a
  differential fuzz oracle with a committed seed corpus.</fact></item>
    <item><fact id="RULE-UNIFORMITY-IS-LOAD-BEARING" status="impl/done">Uniformity is load-bearing: one idiom per operation; exceptions are
  marked (`//spec:deviates … reason`), 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-GO-AI-NATIVE-UMBRELLA" status="impl/done">`go-ai-native` — `init` (bootstrap policies + registries), `floor`
  (gofmt→vet→test→staticcheck+exhaustive→conform→specmap→test-gate, one
  exit code), `health` (the sweep's fact collector), `test-gate`
  (xfail-strict over `go test -json`) / `tripwire` / `trace` /
  `fast-loop` / `codemod`;</fact></item>
    <item><fact id="TOOLCHAIN-NARROW-ENGINES" status="impl/done">plus the narrow `go-ai-native-conform` and
  `go-ai-native-specmap` engines,</fact></item>
    <item><fact id="TOOLCHAIN-AGENTIC-TYPE-ORACLE" status="impl/done">and the agentic type oracle
  `go-ai-native-tcg` (also served over MCP by
  `mcp:org.vibevm.ai-native/go-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 gopls with the SAME conform
  rules as the gate — GUIDE §13, §14 move 5; prerequisites go ≥ 1.24 +
  `go install golang.org/x/tools/gopls@latest`; honesty: gopls stands on
  go/types, the reference implementation of the spec — tighter than
  rust-analyzer↔rustc, still not the compiler; 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 go-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/go-ai-native-cli`),
or in place via `cargo run --manifest-path
vibedeps/&lt;stack-slot&gt;/Cargo.toml -p go-ai-native-cli --bin
go-ai-native -- &lt;args&gt;`.</fact></p>
  <p p="10"><fact id="wiring-and-sweep-pointers" status="impl/done">Wiring recipe: GUIDE §14; sweep idioms:
GUIDE §15.</fact></p>
  <p p="11"><fact id="PROCEDURES-AS-AGENT-SKILLS" status="impl/done">Procedures as agent skills: `/go-ai-native-sweep`
(recurring), `/go-ai-native-terraform` (brownfield adoption) —
`vibe skill install` projects them.</fact></p>
</spec>
