How anchorstate-lab/gmr works
GMR is a grounded-memory runtime: it watches declared coordinates, records readings and transitions, and lets callers retrieve drifting memories or test whether one-shot conclusions remain grounded. The principal CLI flow initializes and opens anchors, observes them during checks, and hands due memories back for review and acceptance. Separate runtime operations read and sample anchors, bind or ground claims, and preserve journaled state. The README documents these capabilities; unsampled command and runtime modules are represented at their exact enclosing paths, with only documented wiring shown.
Main entry points: src/lib.rs Runtime API · src/lib.rs Runtime assembly · src/lib.rs Coding probes · mod.rs SQLite store
Components 18
User interfaces
- GMR CLI
console/cli/src/main.rs - Commands
console/cli/src/verbs - Node and Python SDKs
console/node/src/lib.rs - Runtime assembly
console/core/src/lib.rs
Grounding runtime
- Runtime API
crates/gmr-runtime/src/lib.rs - Observe and check
crates/gmr-runtime/src/observe.rs - Read and ground
crates/gmr-runtime/src/read.rs - Memory bindings
crates/gmr-runtime/src/memory.rs - Claim links
crates/gmr-runtime/src/link.rs - Invariant evaluation
crates/gmr-expr/src/eval.rs
Evidence probes
- Probe dispatch
batteries/transport/src/lib.rs - Coding probes
packs/coding/extract/src/lib.rs - Drift rules
packs/coding/shapes/src/lib.rs
Persistent state
- SQLite store
crates/gmr-store/src/sqlite/mod.rs - Anchors and journal
crates/gmr-core/src/lib.rs
Content integrations
- Content providers
batteries/provider/src/lib.rs
Other components
- Person or agent
- Project files
Connections 20
- Person or agent → GMR CLI: runs commands
- GMR CLI → Commands: dispatches
- Commands → Runtime assembly: calls runtime
- Person or agent → Node and Python SDKs: calls SDK
- Node and Python SDKs → Runtime assembly: opens runtime
- Runtime assembly → Runtime API: assembles
- Runtime assembly → SQLite store: opens store
- Runtime assembly → Content providers: registers providers
- Runtime API → Observe and check: dispatches checks
- Runtime API → Read and ground: dispatches reads
- Runtime API → Memory bindings: uses bindings
- Runtime API → Claim links: uses links
- Runtime API → Invariant evaluation: evaluates invariants
- Observe and check → Probe dispatch: requests observations
- Probe dispatch → Coding probes: routes coordinates
- Coding probes → Project files: reads source
- Coding probes → Drift rules: supplies observations
- Runtime API → SQLite store: reads and writes state
- SQLite store → Anchors and journal: persists domain state
- Read and ground → Content providers: fetches stored content