Portable, verifiable records for real-world events. Food is the first production profile in v0.1.
Grain is a protocol plus a conformance suite. It is not an app, not a hosted platform, and not a global registry.
The short version: if two independent implementations read the same valid input, they should agree on the bytes, the verdict, and the result.
Pick one path and get a quick win first:
- See the repo quickly:
docs/human/start-here.md - Run one command first:
./scripts/demo - Run one happy-path demo:
docs/human/quickstart.md - Inspect repo-native fixtures:
examples/reference-fixtures/README.md - Build the smallest possible app:
docs/human/sdk/minimal-app-example.md - Run local reference apps without paid accounts:
docs/human/sdk/quickstart-ios-reference-app.md,docs/human/sdk/quickstart-android-reference-app.md - Run a local scanner flow:
scripts/sdk/run_local_scanner_flow.sh, thendocs/human/sdk/scan-quickstart.md - Start from app templates:
templates/ios-starter,templates/android-starter,templates/web-wasm-starter - Hand one SDK SHA to another team:
docs/human/sdk/source-sdk-handoff.md - Prove external npm-style imports without publishing:
fixtures/external-consumers/npm-sdk - Build an app on top of Grain:
docs/human/building-on-grain.md - Use the SDK path:
docs/human/sdk/start-here.md - Understand the public/private product boundary:
COMMERCIAL_BOUNDARY.md - Implement Grain itself:
docs/human/implementing-grain.md - Maintain the repo:
docs/human/maintainer-start-here.md - Run release-grade verification:
docs/human/portability-pack.md
- Onboarding:
docs/human/start-here.md,docs/human/quickstart.md,docs/human/overview.md,examples/reference-fixtures/README.md - Build:
docs/human/building-on-grain.md,docs/human/sdk/start-here.md,docs/human/sdk/scan-quickstart.md,docs/human/sdk/quickstart-ios-reference-app.md,docs/human/sdk/quickstart-android-reference-app.md,docs/human/sdk/device-abstraction.md,docs/human/sdk/local-publication.md,docs/human/sdk/certification.md,docs/human/sdk/source-sdk-handoff.md,docs/human/sdk/minimal-app-example.md,COMMERCIAL_BOUNDARY.md,sdk/README.md,examples/README.md,fixtures/external-consumers/npm-sdk,templates/ios-starter,templates/android-starter,templates/web-wasm-starter,core/ts/grain-sdk/README.md - Implement:
docs/human/implementing-grain.md,conformance/SPEC.md,conformance/contract/runner_v1.md - Operate:
docs/human/portability-pack.md,docs/human/repro-checklist.md,docs/human/release-process.md - Maintain:
docs/human/maintainer-start-here.md,CONTRIBUTING.md,docs/human/repository-settings.md,docs/human/maintainer-writing.md - Vision:
docs/human/future-vision.md
- Stable, canonical bytes for protocol objects
- Portable verification through CID + COSE
- Deterministic ledger and manifest behavior
- Private sync semantics for encrypted objects
- Strict conformance checks that independent implementations can run
- That the content is true
- That one server or vendor is the source of truth
- That Grain itself is a hosted product platform
- That this repo contains a production app, account backend, App Store lane, or commercial product implementation
- That anything outside strict conformance semantics will interoperate
- v0.1 core rules are stable inside protocol major version 1.
- The conformance suite in this repo is the release gate.
- Rust Core in
core/rustpasses the strict suite. - The full TypeScript engine in
runner/typescriptis checked against the same suite plus drift checks. - The shared TypeScript protocol core in
core/ts/grain-ts-corekeeps the runner and SDK on the same execution logic. - The TypeScript SDK in
core/ts/grain-sdkgives app builders a safer layer on top of the same protocol rules. - Portable client SDKs, workflow contracts, templates, and local reference apps live under
sdk/,templates/, andexamples/. - The optional AI sidecar in
core/ts/grain-sdk-aistays outside the core SDK surface and is wired in explicitly. - CI evidence is tied to commit SHA on
mainand on release tags. - Release-grade verification is available through
./scripts/certify. - Repo-native developer-product checks cover
./scripts/demo, reference fixtures, profile registry, security regressions, and the Rust/TS/WASM interop matrix.
Blessed local bootstrap:
./scripts/bootstrapQuick repo health view:
./scripts/doctorOne-command demo:
./scripts/demoFast local verification on the pinned local toolchain:
./scripts/verifyRelease-grade certification with deterministic evidence:
./scripts/certifyCompatibility alias:
./scripts/ops/run_verification_pack_v1.shIf you generate evidence, use the exact Node patch version pinned in .nvmrc.
Evidence records node -v, so floating 22.x resolution changes inputs-hashes.json and the final evidence hash.
Optional fuzz smoke:
./scripts/certify --fuzz-smokeConformance statement:
- Passing the full suite in Strict Conformance Mode is the conformance criterion for Grain v0.1.
- A strong interoperability claim only makes sense after two independent full implementations pass the full suite.
Check these first:
spec/NES-v0.1.mdfor the protocol rulesspec/schemas/grain-v0.1.cddlfor machine-readable structureconformance/vectors/for the release gate and expected behavior
Full precedence order:
spec/NES-v0.1.md(normative MUST/SHOULD/MAY)spec/schemas/grain-v0.1.cddl(machine-readable schemas)conformance/vectors/(conformance criterion; release gate)spec/profiles/(CBOR/COSE/E2E/QR profiles)spec/FREEZE-v0.1.md,spec/FREEZE-CONFIRMATION-v0.1.md,spec/SCOPE-v0.1.md,spec/INTEROP-v0.1.md,spec/RC-POLICY.md,spec/INTEROP-CLAIM.md,spec/rc/**docs/llm/adr/core/rust/,core/ts/grain-ts-core/,runner/typescript/,core/andsdk/
conformance/README.mdconformance/SPEC.mdconformance/contract/runner_v1.mddocs/llm/README.mddocs/llm/CONFORMANCE.mddocs/llm/INVARIANTS.mddocs/llm/EDGE_CASES.mdcore/ts/grain-sdk/README.md
CONTRIBUTING.mdSECURITY.mddocs/human/maintainer-start-here.mddocs/human/maintainer-writing.mddocs/llm/CHANGE_POLICY.mdadr/0000-template.md
If a PR changes core protocol rules, add an ADR. Those changes are usually breaking.
Apache-2.0. See LICENSE and NOTICE.