D47 — The dataset is a log of signed bundles; SQLite is its index¶
- Status: Accepted — in parts: D47b (slice 21), D47c–f (slice 22), D47g–k (slice 23: contributors, signing, verify, pull, review by contributor), D47l–p (slice 24: shared scopes, the sweep log, local leases, what a writer had not seen,
kg log), D49e (slice 26:kg revert) and D51–D51d (slice 28: the hosted peer); amends D2; amended by D57 (a dataset that publishes states its licence: CC-BY-4.0 by default) - Date: 2026-09-23
- Origin: slice 20, after the single-researcher build was finished
- Area: foundations
Decision¶
Several people, each with their own agents, will work on one dataset independently and contribute back.
- The shared dataset is a git repository of append-only bundles.
graph.dbbecomes an index thatkg rebuildproduces from them. It can be thrown away. - A bundle is one closed changeset.
- It carries its rows exactly as stored. They keep their ULIDs, which are already collision-free across machines, so combining two contributors' bundles is a union, never a merge of edits.
- It has a manifest naming:
- the contributor, and the actor kind of each row (
human,assisted,autonomous); - the tool and model;
- the intent and the scope;
- the pack versions;
- the upstream head it was built against.
- the contributor, and the actor kind of each row (
- It is signed with the contributor's ssh key.
- Page captures travel with it only where the source may be shared.
- Status is decided by reviews, not stored in rows. A merge or a rejection
travels as a decision bundle of
reviewsrows. A rebuild applies rows, then decisions, in log order. - Settings that change what is computed are shared. Source weights, scoring,
resolver thresholds and domain trust live in the dataset's
dataset.yaml, so everyone reading the same log reads the same current values. Personal settings (fetch, the local write policy) stay in~/.kg/kg.yaml. - Contributors are named in the dataset.
contributors.yamlgives each person a handle, a key and a role. Agents are named under their person, with the scopes they are approved for. - Review scales with the kind of edit and the contributor's standing.
- Evidence from a trusted researcher, with a quote checked against a shared capture, lands by policy.
- Judgements wait for a maintainer: entities, truths, merges,
different_from. - An agent's first rows in a scope are reviewed one at a time until it has earned trust there, and an objection pauses it.
- Trust never carries from one scope to another.
- Checks run before a person looks.
kg bundle verifyruns in CI on every pull request. It checks: - the signature, the pack schema and the six hard rules;
- quotes against captures;
- pack versions;
- that no
local_onlyrow is present; - that the bundle was not built against a head too far behind.
- Nothing is deleted, including a bad contribution.
kg revert <bundle>stages retractions and unmerges as a new bundle. - A hosted server is a peer. It authenticates people, stages as them and writes bundles like anyone else. This is where D2's deferred claude.ai path lands.
The first contributors are a small trusted team. Public contribution is not planned.
Why¶
D2 made the graph single-user so that the research loop could be proven first. It has been: 19 slices. The code now assumes one person in six places:
- one global open changeset;
- an actor that is a role and is declared, not verified (D44);
- no record of who staged a row;
- no instance id;
- no export;
- scoring settings in a per-user file, so two people holding the same rows would compute different current values.
Before designing, we looked at how open-data projects take contributions from many people. The lesson that shaped this ADR: our claims cannot conflict the way cells or pages do. They are append-only (like BODS statements and nanopublications), a correction supersedes (like Wikidata's deprecated rank with a reason), and a disagreement is a contested value. What is missing is everything around that core:
- A unit of accountability and of revert. OSM's
changesets, and its
import guidelines
written after the TIGER import went wrong
(past problems).
Hence the bundle, and
revert. - Review set by edit type. MusicBrainz makes destructive edits wait longer, and auto-editors skip the queue for the rest. Hence the policy keyed on role and operation.
- Agents are bots. They are disclosed, approved per task after a trial run,
and stopped on objection. Sources:
Wikidata's bot policy,
OSM's automated-edits code,
and the 2025–26 English Wikipedia position that an
autonomous agent is a bot.
Hence
actor_kind, per-scope approval and probation. - Machines check before people do. OpenAddresses validates every pull request
in CI.
Hence
kg bundle verify. - Keep every contribution; decide what is shown by rule. Open Supply Hub
ranks sources
instead of overwriting them. Our scoring already does this. Sharing it through
dataset.yamlkeeps it the same for everyone. - Review capacity is the real limit. DoltHub ended its paid bounties because rewarding volume flooded its reviewers. Hence evidence landing by policy, and judgements, the only thing that waits, staying rare.
Alternatives¶
- A hosted database first. It gives identity cheaply, but gives up local-first and needs infrastructure before the model of contribution is proven.
- Exchanging bundles with no upstream. Nothing would decide what is canonical.
- CRDT sync (cr-sqlite, Automerge). A union of immutable rows needs no CRDT, and the mutable parts (review decisions, what is current) are exactly where last-writer-wins would hide a disagreement the graph exists to show.
- Replaying operations instead of shipping rows. Replay re-runs the resolver
on the receiving side, which then refuses entities the upstream already holds
(hard rule 5). Rows keep the contributor's own resolution, and duplicates across
contributors go through
kg dupeslike any other.
Open questions¶
- The dataset's licence (CC0, as Wikidata and MusicBrainz's core use, or share-alike, as OSM's ODbL). Required before anyone outside the team contributes.
- Which sources may have their captures shared. Official records and openly licensed data, surely. Most press cannot be. A capture that is not shared still has its sha and quote, and anyone can re-check it by fetching.
- How far behind the upstream a bundle may be before verify refuses it rather than warns.