Skip to content

The contract-first knowledge graph

The always-on you has to stay small, but you still want the AI to know a lot. The fix is to keep deep knowledge out of every-turn context and put it in a graph the AI walks on demand. In MemMini that graph is wiki/ — plain markdown, no vectors, no database, just files with frontmatter and typed links plus a deterministic registry.

Each page links to others under typed section headings that name the kind of relationship, and the link’s anchor text carries the reason to follow it:

HeadingMeans
## Depends onthis needs that to exist or stay healthy
## Unblocksthis enables that to proceed (the mirror of Depends-on)
## Contrasts witha comparable alternative with different tradeoffs
## Relatedweak association — not a dependency

[skin turns red when ripe] beats [see also: ripeness]. A reasoned anchor tells the model when to traverse; “see also” tells it nothing.

The load-bearing rule: a ## Depends on edge must name the contract it rides on — the protocol, format, interface, schema, SLA, or convention that lets the two sides connect. If you can’t name the contract, it isn’t a dependency; it’s a ## Related. Contracts are first-class because every real dependency rides on one, and naming them is what makes parallel work possible: two sides can build independently against a stable agreement.

The graph stays honest by construction: every Depends on has a mirrored Unblocks on the other page, and edges without a contract get flagged. Distillation enforces these invariants so the graph doesn’t quietly corrupt as it grows.

The AI doesn’t load the whole graph. It uses three tiers:

  1. a one-line habit rule in the injected context — on a factual claim, consult the wiki first;
  2. wiki/INDEX.md hubs (trigger phrase → subdirectory) compiled into context;
  3. on capable platforms, tools that read a page by slug or walk its typed edges N hops; elsewhere, paste or a compiled domain bundle.

Canonical schema — frontmatter fields, entity and contract types, dependency kinds, critical-path markers: wiki/README.md. See also Wiki schema reference.