A minimal, dependency-light implementation that serves as executable documentation. It is NOT the protocol. A production implementation would persist, index, rank, and secure; this one proves the observable contract.
What it demonstrates
- Scope containment and isolation
- Store idempotency by identity
- Immutable
created_at+modifiedtracking on update - Unknown-type / metadata lossless round-trip
scope_deniedon unauthorized cross-scope retrieval- Capability discovery with
protocol_version
Usage
sgm discover
sgm store fact-hello --type fact --scope project=demo --content "SGM works."
sgm retrieve --scope project=demo --text "SGM"
sgm conformance
The source lives in reference/ — an in-memory SgmStore plus a CLI. It passes the core conformance checks (7/7).