- Offline deterministic behavior is the default.
- The default runtime is standard-library only.
- Distribution remains one auditable Python file.
- Development source is modular and builds that file deterministically.
- Recall is a pure read.
- Durable mutations are serialized, atomic, recoverable, and journaled.
- Current and immediately previous storage formats remain readable.
- Optional semantic acceleration cannot mix ranking spaces.
- Project memory never enters the user-global tier silently.
- Generated agent content has explicit ownership boundaries.
src/mind/source.json orders ten domain fragments:
- prelude/filesystem;
- language and lexical retrieval;
- optional embedding protocols;
- graph and provenance;
- cortex;
- dreams;
- export and portable invocation;
- policy and pending queue;
- lifecycle, storage, merge, doctor, and growth;
- command line and protocol server.
tools/build_single.py compiles every fragment, concatenates exact bytes, and
either writes or verifies mind.py. Tests import both modular source and the
artifact and compare behavior.
Every public graph mutation:
- acquires the per-object thread lock;
- acquires the cross-process graph lock;
- reloads the newest graph;
- makes the semantic decision;
- commits the graph once;
- appends one durable journal batch;
- appends one telemetry batch.
Direct in-memory edits are unsupported public behavior. Internal tests that
construct a state explicitly call _save() before invoking a public
operation. This removed legacy mutation trackers and repeated full-graph
digests.
Direct retrieval uses IDF-scored keys. Related-term expansion and bounded spreading activation add graph evidence. Reciprocal-rank fusion stabilizes heterogeneous channels. The optional semantic stage reranks only the bounded head.
One ranking elects one backend:
- the persistent server is attempted first when explicitly configured;
- otherwise one batch command is attempted;
- every vector must share model identity and dimension;
- any failure selects offline scoring for the entire ranking.
Receipts retain direct, spread, fused, semantic, final, backend, call, latency, and fallback information.
Graph format 2 stores typed metadata and directed relation fields. Journal format 2 stores compatible local ISO time, UTC epoch nanoseconds, and stable event IDs.
Current journals segment as whole append-only files. Segment creation records the segment digest in the new current journal. Reads present current and segments as one logical log. Active archives rotate in constant time at their budget.
Backups are plain files under .mind/backups/ with a SHA-256 manifest. Restore
is dry-run by default, creates a pre-restore checkpoint, executes an exact
write/delete plan, and resumes an interrupted plan before graph loading.
Telemetry and scheduling are separate:
signals.jsonlis bounded observational data;scheduler.jsonis bounded authoritative state;- a lease prevents overlapping dream cycles;
- a claimed pending count is subtracted only after successful completion;
- oversized or unreadable telemetry resets without disabling scheduling.
Dream inputs are graph weights and metadata, not replayed signal text.
Automatic policy rejects secrets and identity-like or transient data. Typed metadata controls expiry, pinning, trust, sensitivity, promotion, and slot-aware conflicts.
Forget is a retrieval tombstone. Redact and purge use a lifecycle outbox that rewrites managed stores one path at a time and resumes after interruption. Backup manifests are recalculated after privacy rewrites.
Three-way journal merge accepts an explicit common ancestor. Events already in the base are excluded from branch suffixes. Suffix events deduplicate by stable ID and sort by UTC time, actor, and event ID. Replay recomputes graph weights from operations, so counters add exactly and floats are not snapshot-merged.
The generated agent contract is the broad fallback. Structured integrations
are available through context --json, integrations --json, JSONL bulk
ingest, and the standard-input/output protocol server.
No mechanism can force a host that ignores both instruction files and integration calls. Documentation states this boundary explicitly.
- focused unit and regression tests;
- source/artifact differential tests;
- concurrency and crash injection;
- foreign-writer and line-ending tests;
- multilingual, discrimination, fuzz, and soak suites;
- immutable LongMemEval and paraphrase evidence;
- mutation self-tests and structured mutation reports;
- thirty-session and five-year autonomy simulation;
- nine operating-system/Python CI cells;
- claims and privacy gates before publication.