How kg was built: slices 0–39¶
The slice-by-slice record, moved verbatim from the plan as each part was finished: slices 0–19 at slice 20, slices 20–38 at slice 39. What is true now is in the design; why, in the decisions; what is still open, in the backlog; what comes next, in the roadmap.
File paths below are as they were written, relative to the repository root.
Slice 0 — Skeleton ✅ done¶
The thickest slice: a walking skeleton has to touch everything once.
Shipped: pack loader/validator (src/kg/packs/loader.py), store
(core/store.py), sources and events with quote checking (core/sources.py),
values and partial dates (core/values.py), staged writes with changesets and
merge/reject cascades (core/writes.py), reads (core/read.py), CLI
(cli/main.py), MCP handlers (mcp/server.py), 77 tests including the
slice0_abilene golden session. Decisions: docs/adr/.
Build
- Pack loader and validator: imports, extends, hints, inverse_of mirror
checking, fixture field checking. Unknown hint keys are an error; missing hints
are fine.
- Store + repository interface (SQLite): sources, events, entities,
claims, changesets, decisions (same-as / different-from / re-attribution).
Append-only; nothing is ever updated except status.
- Sources and events: URL normalisation, publisher and publication date, quote
checking against --text/--text-file (hard rule 6), compressed snapshots,
event reuse on identical source+locator+quote.
- Staging: ULIDs, status=staged|merged|rejected, automatic changesets,
dependency-aware merge, reject cascading to dependents.
- kg init, kg schema show|test, kg add event, kg add entity,
kg add claim, kg get, kg merge, kg review list (bare list; the full
review experience is slice 6).
- MCP: read(op=get|schema), write(op=event|claim|entity), review(op=list|merge).
Demo: all three packs load; create a real site from a real press release with
a checked quote; merge; kg get shows it. A quote that is not in the supplied
text is refused.
Slice 1 — Claims engine ✅ done¶
Where "evidence, not opinion" becomes real.
Shipped: core/scoring.py (weights, domain trust, independence and echo
detection, the supersede rule; fading since retired, D6e), core/claims.py (value grouping,
retraction, current/unverified/contested/rumours/projections, history),
ranges and approximations in core/values.py, --retract/--inputs/--low/
--high on writes, kg get --as-of/--known-at, kg history, and the
slice1_contested golden session. 101 tests. Decisions: docs/adr/.
Build
- Kinds: stated (default), projection, derived (--method, --from),
rumoured.
- Two timelines: valid_from/valid_to/period, recorded_at, merged_at;
partial-precision dates and range comparison.
- Values: unit normalisation, raw_value, money with currency (never
converted), point / range / point_with_range, approx with ±5%.
- --retract (evidenced) and multi-valued set semantics.
- Scoring: source weights, domain trust, independence and echo detection, fading (retired, D6e),
derived propagation, rumoured ×0.5, unverified-quote ×0.7.
- Current-value rule with the supersede threshold; unverified update state;
contested detection.
- kg get --as-of D, --known-at D, kg history <entity> <property>.
- MCP: read(op=history), write(op=claim) extended.
Demo: 96 MW from a filing vs 100 MW from a trade article → contested, both shown with scores. A single blog post claiming "operational" does not flip a status backed by a filing; it lands in Verify. A second independent source promotes it.
Slice 2 — Relations ✅ done¶
Shipped: core/relations.py (canonical direction, alias flipping, attribute
validation, entity labels), relations as claims through the same engine
(claims.relation_state), kg add relation, -e edge=<entity> at creation,
both-direction rendering in kg get and --json, and the slice2_relations
golden session. 124 tests. Decisions: docs/adr/.
Build
- Relations as claims with entity values: valid ranges, contested, retraction,
scoring, history — all inherited from slice 1.
- Canonical direction with inverse_of aliases; kg add relation accepts either
name; get renders edges from both ends.
- Edge attributes; evidence_policy: inferable satisfied by a derived claim.
- multi: true edges as sets.
- MCP: write(op=relation).
Demo: a site's operator and tenants; the operator organisation's page lists
its sites; an operator change over time reads correctly with --as-of.
Politician catch-up ✅ done¶
Not in the original plan: the politician pack run through slices 0–2, which
found seven engine bugs the data-center pack could not (D6e–g, D7c, D8b, D12c,
D13d) and reversed the fading part of D6a. Golden politics_s2_member,
tests/unit/test_politics.py. From here, both packs run through every slice.
Slice 3 — Brief and sets ✅ done¶
The slice that makes the next session cheaper.
Shipped: events (temporal: event, D18e); core/checks.py (staleness rules,
status timeline, verify); core/notes.py (compiled truth, deferred items,
questions, closures); core/brief.py (compact and full brief, entity timeline with
--since, query, watchlists, set brief and worklist); kg brief | query | watch |
truth | defer | ask | answer on both surfaces; goldens slice3_brief and the
slice-3 part of politics_real_members. 183 tests. Decisions: D13e, D13f, D14f,
D14g, D14h, D18e, D23b, D26f.
Build
- Staleness: max_age, projection_passed, status_dwell.
- Status timeline: forward skips fine, backward steps and terminal exits → Verify.
- Compiled truth: versioned, staged, dated, warned when claims are newer.
- Deferred lifecycle: defer, defer resolve --into, defer drop --why,
global brief --deferred, deferred text surfacing in find results.
- Open questions: kg ask, kg answer --from|--drop.
- kg brief compact (~400 tokens) and --full.
- Wide mode: kg query --type T --where …, watchlists in the database
(kg watch add|list|rm), kg brief --set <name> with a table + ranked
worklist, --props to narrow a sweep.
- MCP: read(op=brief|query|deferred|questions),
write(op=truth|defer|defer_resolve|defer_drop|ask|answer).
Demo: deep — a full brief on one seeded site showing Verify, contested, stale
and one open question. Wide — brief --set over a dozen seeded sites, ranked by
what needs attention.
Slice 4 — Resolver, merge and duplicates ✅ done¶
Shipped: core/resolve.py (find, dupes), core/identity.py (merge, unmerge,
not-same, canonical/members), hard rule 5 inside creation, merged entities read as
one everywhere, the strip_fields pack hint, every fixture executed (13, one of
them real), kg find | dupes | merge-entities | unmerge | not-same and the matching
MCP ops, goldens slice4_resolver and politics_real_resolver (Natalie and Charlie
Elphicke; Cameron by title and id). 218 tests. Decisions: D11b, D12d, D13g, D20b,
D20c, D21b.
Build
- kg find "<text>" --type T [--fields k=v]: external id → alias (normalisation
with pack filler tokens, operator-prefix stripping) → fuzzy within a block.
Blocks use any historical value; ambiguous on multiple alias hits.
- Discriminator vetoes before scoring; thresholds from kg.yaml.
- create_requires warnings; hard rule 5 (find must have run in this
changeset before add entity); --rejected-candidates.
- kg dupes [--type] [--since]; shared-external-id hard signal; auto-run on merge.
- kg merge-entities A B --from <event> (same-as, always confirmed, unmerge);
reads and writes follow through to the kept entity.
- kg not-same A B --why (different-from; suppresses future proposals).
- Politician pack fixtures run here as the generality check — no importer, no
research (D25).
- MCP: read(op=find), review(op=confirm_match), write(op=merge_entities|not_same).
Demo: all 12 fixtures across the three packs pass; a deliberately planted
duplicate is proposed by dupes, confirmed, and afterwards find/get/relations
all resolve to the kept entity; a false pair is suppressed by not-same.
Slice 5 — Import ✅ done¶
Shipped: core/ops.py (atomic batches, $ref binding, and the one write
dispatcher the CLI, MCP and importers all go through), Store.batch(),
core/importers/ (the driver, epoch-data-centers, parliament-member),
kg write --ops and kg import with --list|--limit|--stage|--dry-run|
--published-at|--new, MCP write(op=ops|import) and read(op=importers),
goldens slice5_import and politics_real_import, a checked-in seven-site Epoch
subset under tests/golden/sources/epoch/ (CC-BY, credited). 263 tests.
Decisions: D31, D31b–D31i, D7d.
Build
- Importer interface: dataset → ops batch, one event per record (D25a,
D31c); official_record/aggregator typing; quotes checked as always.
- Epoch importer: 86 sites and 498 dated timeline rows, so values arrive as
ranges and future rows as projections (D31e, D31f).
- Parliament importer: one member, with every party/seat/House spell dated —
Natalie Elphicke's defection reads as two ranges.
- Re-running an import changes nothing (D31d); close calls are deferred, not
guessed, and --new records the answer (D31g).
Demo: the full dataset imports 70 of 86 sites with 16 genuine questions left for a person; the seven-site golden runs the whole loop — import, read, answer one question, import again — and the second import writes nothing at all.
★ Checkpoint — first real sessions ✅ done¶
Not a build slice. The skill was installed (~/.claude/skills/kg), the MCP
server registered (.mcp.json), and the graph filled with Epoch's 86 real sites.
Then two genuine sessions: deep on OpenAI Stargate Abilene (Crusoe's own
press release and Compute Atlas, five verified quotes), and wide as a status
sweep over a Texas watchlist.
What worked. Corroboration paid off on real data: the eight-building
projection went 0.40 → 0.82 when Crusoe's release agreed with Epoch from an
independent direction. The supersede rule preferred the press release (0.70) over
the aggregator (0.40) on grid capacity and kept the loser visible as an unverified
update rather than deleting it. Hard rule 6 was satisfiable throughout — five
events, five checked quotes. kg find before writing caught that Crusoe already
existed and that a second Abilene entity was in the graph.
What it found. A wide sweep over eight real sites exposed, on the first try, a
correctness bug that 265 tests had missed: a site with nothing built read
status: operational, because nothing stopped a value dated 2027 from being
current today (D32, D32b).
What got in the way, and what was done about it:
| Friction | Fix |
|---|---|
Verify listed 13 lines per entity, burying two real disagreements behind country: US |
thin sourcing is said once per entity (D32c) |
| A sweep of 8 sites gave 8 identical worklist lines | shared findings move to "true of the whole set"; the worklist ranks on what differs (D32d) |
kg dupes proposed CoreWeave sites in six different states as each other |
a value most of a type shares is not evidence (D32f) — dupes now returns nothing on the same graph, and the importer creates 80 sites with 6 real questions instead of 70 with 16 |
Three identical > expected: operational lines |
identical forecasts print once (D32e) |
$3.4bn in SKILL.md rendered as on.4bn |
a skill body is argument-substituted: $ + a digit is replaced before it is read. Written out, with a note |
| A summarising fetch tool gives its own prose, not the source's, so quotes cannot be checked | SKILL.md now says to fetch the page itself, and to store unverified or defer rather than quote what you have not seen |
Left for later: the importer drops Epoch's Address and lat/lon even though
coordinates is in the pack — the strongest identity signal for a site, and the
reason a name had to be confirmed from the web (slice 6). "Stale" reads as
neglect when it means "the best source is old" (slice 6).
Slice 6 — Policy and review ✅ done¶
Deliberately after the checkpoint, and it paid: every rule below came from something the two real sessions did.
Shipped: core/policy.py (a verdict per staged row, per-operation policy,
four escalations), core/review.py (grouped by entity, diffs against current
values, evidence counted, duplicate flags, --diff), pack completeness moved
from write time to review, kg review [--diff] [-v], kg merge --confirm <op>,
MCP review(op=list|diff|merge|confirm_match|reject), goldens slice6_review
and politics_s6_review. The checkpoint's last two backlog items closed: the
Epoch importer stores the address, and stale says which document is old.
304 tests. Decisions: D33, D33b–D33f.
Build
- Write policy: write_policy plus per-operation rules; escalations that refine
confirm and never override auto (D5, D33).
- kg review grouped by entity, with what each row would change and why it waits.
- create_requires/required evaluated over the changeset at review (D33b) —
eighty false "status not given" warnings became five real ones.
- A claim cannot land before the entity it describes; confirming the entity
brings its claims (D33d).
Demo: under confirm, a session's new entity waits with every claim that
describes it; confirming the entity by id lands them together. A corroboration
merges silently, a trade report that disagrees with a filing waits with its
reason, an unchecked quote waits, and a rumour merges because it can never become
current. kg review --diff then says what the session changed.
Slice 7 — check ✅ done¶
Shipped: core/check.py (the mentions contract, quote checking, resolution,
the diff and eight verdicts, ops with $ref), kg check <document> --source
--type --mentions [--ops-out], MCP check — the last of the four tools to be
built, so nothing is behind a "not built yet" message any more. Goldens
slice7_check and politics_s7_check. 334 tests. Decisions: D34, D34b–D34d.
Build
- Mentions: {entity_text, type, property|edge, value, quote, locator} plus the
optional shape a claim already has.
- Checks in order, first failure settles it: the quote (hard rule 6, before
anything else), the shape, the entity (the resolver decides), the difference.
- Verdicts refused / unmatchable / new / stale / missing / alongside /
corroborates / unchanged; only five of them produce ops (D34).
- A dated mention is compared as of its own date (D34d); a value already held
from the same domain is unchanged, because independence is by domain (D34c).
Demo: Crusoe's real Abilene press release triaged against the graph — an
invented sentence about a $12bn build cost refused, a bad enum refused, a
near-miss site name left for a person, 200 MW against the 421 MW we hold marked
stale — then write --ops stages what survived and review puts exactly one
disagreement in front of a human.
Slice 8 — Politics for real ✅ done¶
Shipped: core/importers/interests.py (the Register of Members' Financial
Interests) and core/importers/votes.py (Commons divisions, per member and per
division); parliament-member extended with offices and committees, so the
position type and the holds/member_of edges are exercised on real data;
normalisation.name_order and the resolver's compare-only name split, closing
the slice-4 gap; [derived] on the page. Goldens politics_s8_mp and
politics_s8_division, 348 tests. Decisions: D35, D35b–D35d.
Build - Parliament Members API, Interests API and Commons Votes API importers; per-person and per-topic vote imports. - A real research session on one MP.
Demo: Karl Turner, MP for Kingston upon Hull East — Labour until
2026-03-31 and Independent since, as two adjoining ranges rather than an edit;
a £3,000 donation from Neil Hudgell Limited with the donor resolved to an
organisation carrying its Companies House number; and his no on the Terminally
Ill Adults (End of Life) Bill second reading, with the division as its own entity
and its result marked [derived] from the counts the API published.
TheyWorkForYou is parked. Its useful endpoints need an API key, and the three
Parliament APIs above cover votes and interests without one. What it would add is
Hansard speeches — the statement type — and that is worth doing from the free
Hansard API rather than from a keyed mirror. Moved to slice 9.
Slice 9 — UK data centers, for real ✅ done¶
Shipped: core/importers/neso.py (the GB connection queue), the
plant_type / connection_site / agreement_type / customer additions to
interconnection_request and the UK values on permit_type, and the
resolver's numbering veto. Golden slice9_uk_grid, 366 tests. Decisions:
D36, D36b, D36c.
Two bullets did not survive contact with the sources. uk-planning is not
built: the national planning dataset is a four-authority pilot whose 100,627
rows contain four mentions of a data centre, none of them a data centre
development (D36c), so UK applications arrive through kg check against the
application's own documents. Water properties are not added: no captured source
states a water figure, and unexercised pack surface is what this build avoids.
Companies House moves to slice 10 — it needs a key, and nothing ships untested.
The data-center pack has only ever run on Epoch's aggregated US rows, where every value lands at 0.40 and sits in Verify because the primary documents Epoch cites are never followed (the slice-5 gap below). The UK inverts that. Planning applications, environmental permits and the grid queue are public, dated, free and quotable, so the primary document is the import. That is the argument for the UK as a launch target: not more sites, better evidence.
It is also a harder research problem in a more interesting way, and a probe of the real sources on 2026-09-21 showed why.
What the probe established (all of it re-checkable):
- NESO's Transmission Entry Capacity register is a proper datastore API —
2,198 rows, one per connection, with
Project Name,Customer Name,Connection Site,Cumulative Total Capacity (MW),MW Effective From,Project Statusand a stableProject ID. It maps almost field-for-field onto the pack's existinginterconnection_request, so the grid queue needs no new type:queue_idis theProject ID,iso_or_utilityis theHOST TO,expected_in_serviceisMW Effective From. - The grid queue has no data-center category. Searching it for
"Data Centre" returns nothing. Apatura — the developer behind ten of the
Scottish proposals — has 18 entries, every one of them filed as
Energy Storage SystemorDemand;Energy Storage System, named "… BESS", statusScoping, with connection dates in 2030–2033. One project per SPV:Apatura Project 21 Ltd,Apatura Project 29 Ltd,Apatura Battery Ltd. planning.data.gov.ukis England only. Two hundred local planning authorities sampled, not one Scottish. Planning is devolved, so Scotland means council portals and ePlanning — per-application documents, which iskg checkterritory rather than a bulk import.
That second point is the slice. A site whose planning file says data center and
whose grid file says battery is exactly the disagreement this graph exists to
hold: two dated records, from two authorities, under two names, neither of them
wrong and neither of them the whole picture. The engine already has the shape for
it — two claims, both cited, both current, contested — and the resolver already
has the right instinct, which is to propose the link and make a person
confirm it (hard rule 4). What it must never do is quietly decide that
Bankhead BESS and a data center application are the same project.
Build
- neso-tec: the TEC register, one interconnection_request per row, with the
Customer Name resolved as an organisation. Re-runnable like every importer,
so a project moving from Scoping to an agreement is a new dated claim.
- uk-planning: planning.data.gov.uk for England. Scottish applications come
in through kg check against the planning statement and the EIA, since there
is no national API to import.
- companies-house: officers, persons with significant control and the parent
chain, so Apatura Project 21 Ltd resolves to whoever owns it. Free, but needs
an API key — the first source in the project that does, so the config needs
somewhere to put one. organisation.companies_house_id and subsidiary_of
already exist and were exercised on a real donor in slice 8.
- Pack: water properties (water_source, abstraction and discharge volumes) —
UK coverage is substantially about water and US reporting is not, so the pack
has nothing for it. permit_type gains the UK values (planning_permission,
section_36, abstraction, discharge); authority already holds the
council or SEPA.
- Address and site-name normalisation, promoted from the backlog below: a UK
application identifies a site by address and grid reference, and "Land at
Ravenscraig, Motherwell" has to resolve against "Ravenscraig" without
address becoming a discriminator that suppresses genuine matches.
Demo, as built: the Ravenscraig AI Energy Campus from Apatura's own
consultation page — 550MW at official_record-adjacent weight from the
developer's own words, with an invented £3.9bn refused because that figure,
though widely reported and probably true, is not on the page this event cites.
Beside it, the eighteen connections NESO's register holds for a company called
Apatura, three of them carrying Demand — the closest that register comes to
naming a data center.
Then the question the two records leave open. The page says the campus secured a
formal NESO grid agreement in June 2025 and will connect at Wishaw and
Newarthill. The register has no connection named Ravenscraig, and neither
substation has one held by a company called Apatura; the Newarthill entries
belong to Dalzell (Newarthill) Ltd and SPV GPC 3 Ltd. So
kg find "Ravenscraig" --type interconnection_request returns no_match and
surfaces the deferred question instead of reaching for the nearest battery —
which is the whole design working: two dated records, two authorities, neither
wrong, held side by side for a person. Whether either Newarthill company is an
Apatura company is a question for the company register, which is slice 10.
Note on the definition of done. Like slice 8 in reverse, this slice's capability is pack-specific: there is no politician-pack analogue of a planning importer. The politician goldens stay green and the end-to-end sweep still covers both packs, which is what rule 4 actually asks for.
Slice 10 — Who owns it ✅ done¶
Shipped: core/importers/companies_house.py over the free bulk product,
registered_office / company_status / incorporated_at on organisation,
and previous names as aliases. Golden slice10_who_owns_it, 379 tests.
Decisions: D37, D37b.
Keyless after all. The slice was deferred because the Companies House REST
API needs a key and nothing ships untested against its real source. The free
bulk product — BasicCompanyData, CSV under the Open Government Licence — needs
none, so the obstacle was removed rather than worked around.
Build
- companies-house: company number, registered office, status, incorporation
date, and every previous name as an alias.
- The joins it unlocks: a grid customer name resolves to a registered company,
and an MP's declared donor and a company register entry become one node with
companies_house_id corroborated by both.
What checking the assumption saved. The obvious way to group SPVs is the registered office they share. Measured before it was used, the one Altrincham postcode behind the Apatura companies carries over nine hundred companies across four of the seven parts of the register — a serviced office. Grouping on it would have produced a confident, wholly invented corporate structure that looked like a finding (D37b). The golden prints the evidence: an estate agent, an O-rings manufacturer and a grid developer at one address.
Demo, as built: sixty-seven real companies, and the answer to what slice 9
left open — sharpened rather than settled, which is the honest outcome.
APATURA DC PROJECT 1 through 12 LTD exist, incorporated on one day in
October 2024, and not one holds a grid connection; the batteries do. The
register's previous-name columns then show what the address could not: Apatura
Ltd was Green Power Consultants Holding Ltd, and six of its companies were
renamed out of GPC. Which makes SPV GPC 3 Ltd — holder of the 400MW
connection at Newarthill, one of the two substations Ravenscraig names — a
question worth asking, and Dalzell (Newarthill) Ltd, on a different address
with a different lineage, one that is ruled out. The session ends with that
written down as a deferred question carrying what argues each way and what would
settle it: the PSC snapshot, 2.3GB, not imported.
Slice 11 — What they said ✅ done¶
Shipped: core/importers/hansard.py over the free keyless Hansard API,
exercising statement — the last pack type never run on real data;
Record.skip so an importer can decline a row out loud; label truncation;
parliament_post_id and parliament_committee_id. Golden slice11_hansard,
393 tests. Decisions: D38, D38b, D38c.
Build
- hansard: contributions by topic or by member, each a statement attributed
to the member who made it, with the debate as its topic and the search term
never stored.
- A contribution made from the Chair is skipped, on Hansard's own marker.
Demo, as built: a topic search for "data centres" returns nineteen
contributions from seventeen members, and those members meet the Parliament
importers on a person. Michael Shanks — Minister of State for Energy Security
and Net Zero — has his office from the Members API biography, four entries from
the register of interests, and, from Hansard, an answer in a debate about
NESO: the same NESO whose connection queue slice 9 imported, in the same
graph, on the same day's reading. parliament_member_id reads
4998 (1.00, 3 sources).
Three things reading the output fixed. A minister's fifteen-hundred-character
answer was being printed in full as a relation label, burying every other line
and blowing a 400-token brief on its own (D38b). An importer that silently
dropped rows reported created 0, indistinguishable from an empty search (D38).
And every MP import had been asking whether a promotion was a duplicate office —
the API numbers its posts and committees, and storing those numbers took all
three captured members to zero deferrals (D38c).
Slice 12 — Following the citation ✅ done¶
Shipped: core/fetch.py (one gate, off by default, injectable reader),
--fetch on kg add event and kg check and on the MCP write tool, and the
Epoch importer parking what it cites under a new unread_source reason.
Golden slice12_fetch, 408 tests. Decisions: D39, D39b, D39c.
PSC was ruled out first, on evidence. The snapshot is 2.3GB in 32 parts, and two probes (part 1 and part 32) showed the parts are arbitrary shards, not ordered by company number — part 1 skews to 2016–19 incorporations, part 32 to 2021–23, and neither holds an Apatura company. Finding six specific companies means scanning nearly all of it. That is bandwidth, not design, so it stays in the backlog and the slice went to the oldest open item instead.
Build
- --fetch: read the source, check the quote against what the page actually
said. Off unless fetch: on; one gate for every surface.
- The Epoch importer stores its Selected Sources column instead of dropping
it, so a site's brief names the documents it has never read.
Demo, as built: OpenAI Stargate Abilene, whose fourteen properties all rested
on epoch.ai alone. Its brief now also says Epoch cites three documents nobody has
opened. Reading one of them — Mortenson's own page for the project, fetched live
from the URL Epoch gave — took locality from (0.40, 1 source) [unverified]
to (0.79, 2 sources) and the Verify line from fourteen properties to
twelve.
The sweep earned its keep again. fetch reached the MCP handler and was
never declared on the MCP tool, so every fetch over MCP silently did not
fetch — and reported success, because an event with no text is stored with a
reduced score rather than refused. Unit tests passed throughout; only driving
the live server found it. There is now a test asserting that whatever the
handlers read, the tools declare.
The same page sets a trap worth keeping. It says the builder constructed "a
12.5-acre, 1 GW, 345 kV greenfield substation" — one substation among several,
on a site whose IT power is 421 MW. The golden asks for it_power_mw = 1000
with the quote "a 1 GW campus at Abilene", a sentence the page never wrote, and
it is refused. Hard rule 6 caught a misreading it was not designed to catch.
Slice 13 — kg path: what connects these two, and what does not — DONE¶
Three slices running ended on a connection nobody could ask about. Slice 9 left a campus and a grid queue side by side. Slice 10 put an MP's declared donor and a company register entry on one node and left the join invisible unless you read both pages. The graph held the chain the whole time and nothing could walk it.
Built. core/paths.py — breadth-first over edges, expanded through
relation_state rather than the claims table, so merged identity, retraction,
expiry and both clocks come along rather than being reimplemented. kg path on
the CLI, read op=path on MCP, a path op in the golden harness.
The demo, in one line. kg path "Karl Turner" "NEIL HUDGELL LIMITED" crosses
two registers that have never heard of each other — the Register of Members'
Financial Interests says an MP received £3,000 from a company, Companies House
says that company exists and has a number — in two hops, each 0.85, each a
primary register.
A path does not multiply (D40). A chain holds only if every link does, so
what is reported is the weakest hop, named. A product is a number nobody can
check, and it would rank five documented filings below one aggregator row seen
twice. Colossus 2 → Colossus 1 returns two distinct routes, a shared owner and
a shared tenant, and both rest entirely on Epoch at 0.40 — which the weakest hop
says out loud and "0.16" would have hidden.
A crowded node is not a connection (D40d). Found by reading output, not by a
test. With one division imported, kg path connects any two of the eighty-three
members who voted in it in two hops, and would connect any two of six hundred and
fifty on a full import. Every hop is true and sourced; the route means nothing.
Scoring cannot fix it, because each hop is individually strong — what separates
the two cases is the width of the node between them. So the walk measures that
and discloses it: 82 others reach it the same way, plus a line telling the
reader it is shared participation. --max-degree excludes such nodes outright.
Two bugs the build found in itself. The first implementation was blind to
every interest and every vote, because dated edges live under events rather
than values (D18e) — the two largest edge sets in the politician pack, missing
from the walk that exists to show them. And the golden's own commentary claimed
the Newarthill queue row meets SPV GPC 3 Ltd in one hop; it does not, its
customer is Dalzell. Reading the generated snapshot caught a false claim I had
written myself.
The sweep, third slice running. Eleven checks against a live MCP server on
both packs, all passing. The slice-12 declaration test is now generic: it parses
the handlers for every kw[...] they read and asserts the tool declares it,
rather than naming arguments in a list somebody has to remember to update —
which is the exact kind of remembering that failed in slice 12. Mutation-checked
by deleting to from the read tool and watching it fail.
Slice 14 — the archive has to be able to produce the words it quotes — DONE¶
Found by probing the corpus, not by a test. Of 335 events imported from the captured sources, two quoted words that were nowhere in the archive.
The mechanism. NESO's TEC register is one API endpoint, so a query for
Apatura and a query for Newarthill normalise to one URL and are one source —
correctly, they are two readings of one register. But upsert_source stored text
only when a source had none, so the second query's response was verified against
and then dropped. The events were right, the verification was right, and the
archive could no longer show it. That is worse than storing nothing: anyone
re-checking concludes the evidence was fabricated, and cannot tell that case
apart from one where it really was.
Built. A captures table — every distinct text ever supplied for a source,
append-only — and events.capture_sha, the reading a quote was checked against.
Where no text is supplied the quote is checked against the captures already held,
newest first, and binds to whichever contains it, so a page that changed does not
invalidate a quote taken before it changed. A second, differing capture warns; it
is not an error, because a changed page and a register queried twice are both
legitimate (D41).
kg audit re-runs hard rule 6 over everything already written and asks the
graph to prove itself (D41b). Three outcomes, kept apart because they mean
different things: cannot be produced (a defect; the CLI exits non-zero), read
more than once and the readings differ (information), and written with no text
to check (nothing to re-check; already priced into scoring).
The proof. Run against a database built by the previous commit — a real
pre-capture file, migrated v3 → v4 on open — kg audit names exactly the two
damaged events and says what to do about them. On every graph written since, it
reports clean.
The slice-2 golden had been modelling the bug since slice 2. It supplies two different texts for one 10-K URL, and the second one's words were not retrievable from the archive. Nobody noticed, because nothing ever asked.
Migration. Additive only, as D24 requires: one new table, one new column,
SCHEMA_VERSION 3 → 4. sources.snapshot keeps its existing meaning, so nothing
that read it changes.
Slice 15 — a quote has to point at a passage — DONE¶
The hole slice 12 found and slice 14 deliberately left alone. Hard rule 6 asks whether the words are in the document; that is necessary and, alone, weak. "the" is in every document ever written, and a claim quoting it passed a check that proved nothing — then scored HIGHER than an honest claim that admitted it had no text, because it was marked verified.
The rule. A quote under 25 characters that appears more than twice in the source is refused, with the count, because the count is the argument. Longer quotes are exempt however often they repeat: a full sentence is the source's own words and the locator says which occurrence (D42).
Measured, not invented. Across the 428 quotes this repo holds — 335 generated by importers, 93 written by hand into goldens — the shortest is 18 characters, every imported one is at least 101, and not one is both short and repeated. The rule refuses nothing the project already relies on, and two regression tests assert that on every run. The alternatives fail on the same evidence: a minimum length would refuse "421 MW", the correct quote for a capacity; a minimum word count would refuse every quote from a JSON API, because JSON has no spaces.
What it catches. On the Mortenson page slice 12 reads — eighteen hundred characters of menu before a word of content — "Abilene" appears 11 times, "data center" 14, "the" 39. In one Hansard response, "the" appears 687 times. And the page sets the trap slice 12 kept: it says "1 GW" of a substation, on a site whose IT power is 421 MW, with five occurrences to choose from. Quoting the bare figure is how a reader files the wrong number against the right entity; quoting "a 12.5-acre, 1 GW, 345 kV greenfield substation" makes that mistake impossible.
What it does not do, stated in the ADR rather than left implied: it does not check that the quote supports the value. A distinctive quote cited for the wrong property still passes, and no substring check can fix that.
The sweep earned its keep, fourth slice running. kg check verified quotes
with verify_quote alone, so it returned corroborates for the exact quote
add event refuses — handing back ops that the write would then reject. All 467
unit tests passed throughout; only driving the live server found it. Both
surfaces now run the same rule, with a regression test.
Also closed: kg audit --source <url>, scoping a check that was O(whole graph).
Slice 16 — the demo, closed out — DONE¶
After fifteen slices both packs worked end to end on real data and nobody could see it: no README, and no single thing to run. The goldens prove rules, not stories.
Built. A README.md. Two demos in demos/, one investigation per pack, each
printing every kg command before running it against a fresh graph built from the
captured sources — no network, never the user's own graph.db. And
tests/unit/test_demos.py, which runs both and asserts every beat the narration
promises (D43).
uk-data-centres.shframes the open question as the finding. The £3.9bn in every headline is refused because it is not on the developer's page; three registers confirm the company, its eighteen batteries and two Newarthill connections held by other names;kg pathsays there is no connection and how hard it looked; the question is parked on the campus with the document that would settle it — the PSC register.mp-interests.shpresents the chain slice 13 buried: an MP's declared £3,000 donation joined to the Companies House record of its donor, the company number confirmed by both; the party change as dated history; and, asked about the day the money arrived, the party he sat for then and the donation not yet declared.
Writing them found four things the goldens had not, because a narrative that
contradicts its own output is glaring: the parked question was staged and never
merged, so the brief denied the punchline; kg audit only stated its verdict
when there was nothing else to say — the slice-14 golden had been claiming a
verdict its output did not contain; a compiled truth named a council area the
source does not; and "61 of 67 share this office" was an artefact of how the
extract was cut, now said out loud.
Slice 17a — the decision trail — DONE¶
Asked for an audit trace of one cancelled project, the graph could show the evidence
behind every value — source, locator, exact words, the saved capture — and not one
decision about any of it. kg reject --why had been accepting a reason and
throwing it away since slice 6. A row merged because the user said "merge them
all" was indistinguishable from one the policy let through or an import landed.
Built. A reviews table (schema 5, additive): one row per merge or rejection
with the declared actor, the surface, how the row was chosen (named, policy,
release, import), the root id it came with, and why (D44). --by user|agent and
--why on kg merge, --by on kg reject, by on the MCP review tool, and
imports record their surface. kg trace (MCP read op=trace) — every claim,
rejected ones included, with its evidence, capture and decisions (D44b). And a
flag on a name or reference its own quote does not contain (D44c), which is what
that audit found by eye: the county and name cited a sentence that says
neither.
Honest about its limit. The actor is declared, not verified: a person and an agent run the same CLI and nothing local can tell them apart. Every trace says so. Decisions made before schema 5 are reported as unrecorded, never attributed.
Slice 18 — scopes and sweeps — DONE¶
Checking one developer's projects against an outside list found ten of eighteen missing: three left out by a "US only" decision nobody had written down, four in places nobody had looked (the company's own newsroom, county tax-break votes, small local papers), and nothing able to say "the set is N". The graph could say what it knew about an entity, not whether it had all of them.
Built. A scope (D45): a watchlist with an anchor — members hold a current edge
of named kinds to it, either direction — plus criteria and named exclusions, a
clause among them checked by machine. Coverage (D45b): a cited, staged "the set is
N", shown against members and those held out. Channels, sweeps and candidates
(D45c): pack templates under discovery: say where each type shows up, a scope
fills in its anchor and counties, a sweep records what was looked at and when,
and every candidate keeps an appended disposition so nothing is rediscovered.
kg sweep plan / kg sweep record (D45d): the plan as data for whatever runs the
research — Claude Code subagents today — and the results back, with new members
still arriving through check and write under the policy.
Generic by construction: the golden sessions are an invented developer and an invented party, and the same code answers both.
Slice 19 — the channel playbook — DONE¶
Slice 18's machinery was generic; running it was not. Two sweeps took six
hand-written researcher prompts, and everything reusable in them stayed there: a
register's endpoint and the shell-company naming convention sites are filed under
(<site> DC<n>, LLC — the fact that turned 3 filings into 34), which trackers
block, that local press is searched by county and a newsroom listed post by post,
that a grid operator publishes only aggregates so the channel's premise was wrong.
The same sweep handed back 44 updates on existing members and every one was
dropped, because a result could only carry candidates.
Built. Channel templates carry playbook, traps, evidence and
applies_when, and from-pack reports what it skipped and why (D46) — the Texas
registers are no longer offered to a scope whose members are in another country.
kg sweep brief generates the researcher's prompt per channel, --due --out one
per due channel (D46b). A result may carry documents, which go through check
and are staged one batch per document (D46c). Plus same_as, so a candidate
reported under another name is the same candidate.
A sweep is now: plan, briefs, one researcher per brief, record. No prompt written by hand, and what a channel teaches goes back into the pack.
Slice 17 — Extras, as needed¶
Persons with significant control (the 2.3GB PSC snapshot), which is what would
answer slice 10's question and needs a scan of nearly the whole file; embeddings
(sqlite-vec) as resolver layer 4; kg check --extract; entity split; hosted
MCP for claude.ai.
Backlog carried forward¶
Gaps found while building, with the slice that owns each. Resolved items stay listed, struck through, so the trail is visible.
| Found in | Gap | Owner | State |
|---|---|---|---|
| slice 0 | kg get picked the current value by recency alone |
slice 1 | ~~resolved: scoring and the supersede rule~~ |
| slice 0 | Hard rule 5 (find before creation) only warns |
slice 4 | ~~resolved: creation runs the resolver (D13g)~~ |
| slice 0 | create_requires terms naming an edge always warned "thin creation" |
slice 2 | ~~resolved: -e edge= at creation~~ |
| slice 0 | Fixture resolution assertions are checked for shape only | slice 4 | ~~resolved: every fixture executes (D12d)~~ |
| slice 1 | --as-of could not be asked of relations |
slice 2 | ~~resolved: relations are claims~~ |
| slice 2 | kg get shows relations but nothing ranks them for a ~400-token brief |
slice 3 | ~~resolved: a one-line relation summary (D14f)~~ |
| slice 2 | No way to list every relation that changed in a period | slice 3 | ~~resolved: kg brief --full --since (D14f, D13e)~~ |
| real MPs | Events are neither state nor timeless | slice 3 | ~~resolved: temporal: event (D18e)~~ |
| real MPs | Creating an entity from several documents warns "thin creation" until the id arrives | slice 6 | ~~resolved: completeness is checked at review, over the changeset (D33b)~~ |
| slice 3 | kg brief answers "what needs attention" but not "what did this session change": no per-changeset diff |
slice 6 | ~~resolved: kg review --diff (D33c)~~ |
| slice 4 | given_name/surname are not derived from name (D10 promised it), so a query by name alone cannot be vetoed on given name — "Charlie Elphicke, MP for Dover" is a near miss for Natalie rather than ruled out |
slice 8 | ~~resolved: the pack declares its name order and the resolver splits to compare, never to store (D35)~~ |
| slice 5 | Epoch cites a primary document per site (Selected Sources: air permits, WSJ). We store its aggregator row and never follow the link, so every imported value sits at 0.40 and lands in Verify |
slice 12 | ~~resolved: the citation is parked on the site and --fetch follows it (D39c). Reading one document took locality to 2 sources and shortened Verify by two~~ |
| slice 5 | create_requires is checked at creation, so every imported site warns "status not given" even though the timeline rows supply status moments later |
slice 6 | ~~resolved: checked at review (D33b) — eighty false warnings became five real ones~~ |
| slice 5 | Epoch's Project column ("Project Rainier", "Microsoft AI WAN") names a programme spanning several sites; the pack has no type for it, so it is dropped |
slice 17 | open |
| checkpoint | The Epoch importer drops Address and latitude/longitude, though coordinates is a pack property. A site's address is its strongest identity signal, and without it two names had to be matched from the web |
slice 6 | ~~resolved in part: the pack gained address and the importer stores it. Using it to RESOLVE needs normalisation first — sources spell one address many ways — so it is not a discriminator — carried to slice 10: the UK demo turned on a site NAME the queue does not use at all, not on an address~~ |
| checkpoint | A value is flagged stale the moment it is stored from an older document, which reads as neglect rather than "the best available source is 18 months old" |
slice 6 | ~~resolved: it now names the document's age and says to look for a newer one (D33f)~~ |
| slice 8 | The Members API's committeeMemberships does not say whether a committee is a select committee or a public bill committee, so both land as organisation type=committee — an MP's record gains entities named "Pet Abduction Bill" beside "Justice Committee". The source's own name is kept rather than one we invent; telling them apart needs the Committees API |
slice 17 | open |
| slice 8 | A division's NoVoteRecorded list is not stored: the House recording no vote is the absence of a record, not a decision. So "did this MP abstain or were they absent" has no answer, and a pairing arrangement is invisible |
later | open — wants a source that states the reason |
| slice 8 | "Opposition Assistant Whip (Commons)" is proposed as a duplicate of "Opposition Whip (Commons)": same body, so no discriminator vetoes, and the names are 85% alike. Correct to ask, but every MP import will ask it |
slice 11 | ~~resolved: the API numbers its own posts and committees, and storing those ids took all three captured members to zero deferrals (D38c)~~ |
| slice 9 probe | NESO's TEC register has no data-center category: Apatura's 18 entries are all filed as Energy Storage System or Demand;Energy Storage System. So "which grid connection powers this data center" cannot be answered by matching on project type, and matching on name would link Bankhead BESS to a site on a guess |
slice 9 | ~~resolved: plant_type is split into one claim per part, so Demand is queryable, and no for edge is ever written by the importer (D36)~~ |
| slice 9 probe | Companies House needs a free API key. No source so far has needed credentials, so kg.yaml has nowhere to put one and no rule about what an importer may do without it |
slice 10 | ~~resolved without credentials: the free bulk product needs no key (D37). A keyed source will still need this the first time one is genuinely required~~ |
| slice 9 | No UK planning importer: the national dataset is a four-LPA pilot and Scotland is absent entirely (D36c). Applications arrive through kg check, one document at a time, so there is no way to sweep "every data centre application in North Lanarkshire" |
slice 17 | open — most UK councils run one of a few planning portal products with consistent URL shapes; worth an importer on evidence |
| slice 9 | The pack has nothing for water, though UK coverage of data centres is substantially about water. Not added, because no captured source states a figure and unexercised pack surface is what this build avoids | later | open — wants a source, most likely a SEPA or Scottish Water licence |
| slice 9 | Linking a site to its grid connection is entirely manual: kg find lists candidates and a person draws the for edge. Nothing proposes the link, because nothing in either record supports one |
slice 13 | ~~resolved in part: kg path makes the question askable and answers it honestly — the queue row reaches its customer company in one hop, and nothing reaches an Apatura company at all. Still nothing PROPOSES a link, correctly: no source states one~~ |
| slice 10 | Ownership is still not in the graph. The bulk product carries no parent, so "is SPV GPC 3 Ltd an Apatura company" rests on a naming convention and cannot be closed. The PSC snapshot would settle it, at 2.3GB across 32 parts | slice 17 | open — kg path now states the absence precisely rather than leaving it implicit |
| slice 10 | The register is a monthly snapshot with no way to ask what it said last month, so a company renamed or dissolved between imports reads as current until the next one lands | later | open |
| slice 11 | Hansard's written statements, written answers and corrections are separate arrays on the same response and are not imported: only spoken contributions are. A written answer is a statement too | slice 17 | open |
| slice 11 | A statement is named by the words that were said, so every list of statements needs truncating to be readable. A short generated label — speaker, date, debate — would read better than a cut-off sentence, but would be ours rather than the record's |
later | open |
| slice 11 | Import order changes how much a person is asked. With the company register first, every NESO customer name resolves silently; with the queue first, the register's fuller names ("APATURA BATTERY - PROJECT HOLDING 1 LIMITED") arrive as close calls against the shorter names already held. Correct behaviour, but the graph is cleaner if the register goes first, and nothing says so | slice 13 | ~~resolved: SKILL.md says to import the authoritative register first, and the slice-13 golden does (D40e)~~ |
| slice 12 | The unread_source note is one per site, not one per document, so reading one of three cited documents cannot partially close it |
slice 17 | open — per-document notes would be three times the noise for a gain nobody has asked for |
| slice 12 | A quote of one common word passes the quote check, since it only asks whether the words are in the document. Pre-dates this slice and is more visible now that fetched pages are long | slice 15 | ~~resolved: a short quote must nearly pinpoint a passage, thresholds measured against all 428 quotes in the repo (D42)~~ |
| slice 12 | Many of Epoch's citations cannot be fetched at all: Google Drive PDFs, x.com posts, paywalled WSJ and Bloomberg. --fetch helps with the builder pages and the regulator filings and not with the rest |
later | open — a PDF reader would cover the permits, which are the highest-value ones |
| slice 13 | An edge that has ENDED is invisible to kg path unless you already know roughly when it held: --as-of needs a date, and there is no "were these two ever connected" mode. Karl Turner's eight former shadow posts are found only by guessing 2015 |
slice 17 | open — wants a mode that walks expired edges and marks each with the range it held |
| slice 13 | The walk expands every node through relation_state, which is correct and not cheap: a hub costs one full relation read per visit. Fine at 170 entities, unmeasured at a hundred thousand. --max-visits stops it hanging and says so, which is a guard rather than an answer |
slice 17 | open — wants the current_edges projection the plan once named, on evidence of a slow query |
| slice 13 | CROWDED = 12 is a constant in the code, not a pack declaration. A committee of twelve and an operator with twelve sites are not the same kind of crowd, and the pack knows which is which |
later | open |
| slice 14 | Databases written before slice 14 can hold events whose quote is in no capture, and nothing repairs them: kg audit names them and the only fix is to re-capture the source by hand or retract what rests on them |
slice 17 | open — a --repair that re-imports from a supplied file would close it |
| slice 14 | A capture is stored whole, so a source read ten times with small edits keeps ten near-identical copies. Compressed and small at this scale; unmeasured on a long-watched page | later | open — wants a diff-based capture, on evidence of a large database |
| slice 14 | kg audit walks every event and decompresses every capture, so it is O(the whole graph). Fine now; it is the kind of command that wants a --since or a per-source form |
slice 15 | ~~resolved in part: kg audit --source <url> scopes it to one document. A --since still wants a reason to exist~~ |
| slice 15 | The rule cannot tell whether a quote SUPPORTS the value, only that it locates a passage. "in coordination with AEP" cited for it_power_mw passes, and no substring check can catch it |
later | open — wants the reviewer, or a model, not the engine |
| slice 15 | DISTINCTIVE_CHARS and DISTINCTIVE_OCCURRENCES are engine constants. A JSON API and a press release are different enough that a pack might reasonably tune them, as CROWDED might be (slice 13) |
later | open — one constant becoming two pack fields wants more than two examples |
| checkpoint | dupes still proposes 5 false pairs out of 80 sites — Google Arcola against Google Bristow, same owner and same state, different towns. locality would settle every one of them, but it is not a discriminator, and making it one could suppress a genuine match where one source names the city and another the suburb. Reviewable as it stands; wants a second checkpoint's evidence before tuning further |
next checkpoint | open |
| us-scope | Second evidence for the row above. "Crusoe Abilene Microsoft campus" with region=TX ranks Microsoft SAT40 (San Antonio) above Crusoe Abilene Expansion, the right site, and a bare "Abilene" proposes both Abilene campuses at 1.00. locality would have picked the right one. Now two independent cases |
next checkpoint | open — locality as a scoring signal, not a veto, is the candidate |
| us-scope | A company's link to a site that Epoch states only in the site's NAME ("Crusoe Abilene Expansion") becomes no edge, so kg brief Crusoe missed a Crusoe campus until a primary source supplied it. Correct not to infer; worth saying |
later | open — a kg find-style hint ("named after an organisation it has no edge to") would surface it |
| us-scope | quote_locates returns (True, 0) for a quote that is not in the text at all, because it judges distinctiveness and leaves presence to verify_quote. An agent pre-checking with it alone passed "purchasing 10 modular units" against a release that says "ten", and only the write caught it |
slice 17 | open — make it return False on zero, or rename it to say what it checks |
| us-scope | A relation that ENDED on an unknown date (a developer leaving a project "months" before a June 2026 report) can only be retracted. Retraction reads as "the source withdrew this", not "this stopped being true", and there is no "ended by D" bound | later | open — wants valid_to accepting an upper bound, or a distinct ended kind |
| us-scope | A truth written in the same batch as the claims it summarises is immediately flagged "N claim(s) merged since this was written — it may be out of date" | slice 17 | open — compare against the claims that existed when the batch was applied, not when the truth row was written |
| us-scope | it_power_mw is not period-scoped, so "Phase 1: 8 MW, expandable to 25 MW" can only be a dated projection. A press release's headline "900 MW site" is often the power plant, not the IT load, and nothing in the pack says which property a headline campus figure belongs in |
later | open — a pack resolution note first, a property change only on more cases |
| us-scope | Trade press that refuses automated reads (DCD: every article came back as a bot wall) cannot be quoted, so one campus's 1.4 GW (trade press) against 1.0 GW (its utility partner) could not be stored as the contest it is | later | open — same class as the slice-12 row on unfetchable citations |
| us-scope | kg reject --why accepted a reason and stored nothing, since slice 6. Every rejection before schema 5 has lost its reason |
slice 17a | ~~resolved: the reviews log keeps it (D44)~~ |
| us-scope | Nothing recorded who merged a row or how — the user's instruction, the policy, a release or an import looked the same afterwards | slice 17a | ~~resolved: actor (declared), surface and via on every decision (D44)~~ |
| us-scope | An audit of one entity needed kg history per property plus raw SQL |
slice 17a | ~~resolved: kg trace (D44b)~~ |
| us-scope | A creation field cites the creation event even when its quote does not state it (one site's county and name) | slice 17a | ~~resolved in part: flagged in the trace (D44c); fixing a flagged row is still a new claim by hand~~ |
| slice 17a | The actor is declared, not verified | later | open — needs an identity the local graph does not have: a hosted server or signed requests |
| slice 17a | A status with a start date and no end date contests the later stage (a project rumoured vs cancelled, a campus announced vs construction) instead of reading as history | next slice | open — changes how current values are computed, so kept out of 17a |
| us-scope | Nothing could say whether a population was complete: an unrecorded scope decision, one way of looking, no record of where or when, no cited count | slice 18 | ~~resolved: scopes, coverage, channels, sweeps and candidates (D45–D45d)~~ |
| us-scope | Naming candidates in --rejected-candidates at creation is not remembered: kg dupes proposed three energy parks in one province as each other straight after |
later | open — creation could write the different_from decisions itself |
| us-scope | kg review's one-line summary of a new entity shows a projected status (status=energised, valid from 2028) as if it were the field's value |
later | open |
| slice 18 | A coverage qualifier ("contracted hyperscale campuses") is compared with members by a person, not by the engine: members carry no tag saying which kind they are | later | open — wants a pack property, on more than one case |
| slice 18 | Channels are instructions, not code: a sweep of tdlr or tax-abatements is done by hand or by an agent. The registers with a stable API (ERCOT's queue, TDLR's JSON search) would make good importers |
later | open — TDLR throttles; import only on evidence of a routine that needs it |
| slice 18 | A researcher words a site its own way ("the new 900 MW campus in Abilene"), which no resolver matches, so a sweep left every known member open | slice 18 | ~~resolved: a candidate may carry member, matched on the researcher's word when it names a current member~~ |
| slice 18 | Rediscovery is keyed on the candidate's name within a scope: "Starcloud satellite" and "Starcloud-1" are two candidates for one thing | later | open — match candidates through the resolver as well as by name, or let a disposition point at an earlier candidate |
| slice 18 | Names built as " |
later | open — county as a discriminator, the same case the locality rows make |
| slice 18 | The first real sweep: the newsroom listed all 126 posts and first-announced only 5 of 16 members; the tax-abatement channel found 2 sites nothing else had (Haskell, Leon). The channels are complementary, which is the argument for recording which were checked | — | evidence, not a gap |
| slice 18 | Everything reusable about a channel lived in hand-written researcher prompts, not in the project | slice 19 | ~~resolved: playbooks in the pack, and kg sweep brief generates the prompt (D46, D46b)~~ |
| slice 18 | A sweep result could only carry candidates, so 44 updates on existing members were dropped | slice 19 | ~~resolved: results carry documents, checked and staged like any other write (D46c)~~ |
| slice 18 | Rediscovery keyed on the candidate's name | slice 19 | ~~resolved in part: a researcher may say same_as; matching through the resolver is still open~~ |
| slice 19 | A playbook is prose and goes stale; nothing checks that a trap is still true, or that an endpoint still exists | later | open — the skill says to correct the channel when a sweep learns otherwise, which is the same discipline ADRs get |
| slice 19 | from-pack adds and replaces templates but never removes a channel a pack has dropped (a renamed ercot-large-load lingered until removed by hand) |
later | open |
Slices 20–38¶
Slice 20 — consolidation ✅ done¶
The docs caught up with the build before the next design lands on them.
- ADRs repaired, none rewritten: eight bodies that began mid-sentence since the
RFC was split (D12, D14, D14a–c, D17, D25, D27b) have their opening words back,
marked as restored; D27b is superseded by D40, which built
kg path. - Seven ADRs about one source rather than the engine are filed under a new
Findings area and summarised in each pack's
FINDINGS.md. - DESIGN.md: importer count, config defaults and citations corrected; packs'
discovery:templates, the full surface table andlocal_onlydescribed; says plainly that it is single-user today. - PLAN.md split into this file,
BACKLOG.md(35 open rows by area) anddocs/history/slices.md. - D47 (Proposed) sets the direction for slices 21–25.
tests/unit/test_docs.pyalso fails on a stale ADR index, a status naming an ADR that does not exist under any relation verb, an ADR whose decision starts mid-sentence, and a wrong importer count in DESIGN.md.
The direction: many researchers, one dataset (D47)¶
Surveyed first: Wikidata, OpenStreetMap, MusicBrainz, Open Ownership (BODS), OpenCorporates, Open Supply Hub, Global Energy Monitor, Dolt, OpenAddresses, nanopublications, and the 2025–26 Wikimedia policies on AI agents. The survey is summarised in D47. The short version: our claims cannot conflict the way cells or pages do. They are append-only, a correction supersedes, and a disagreement is a contested value, so combining two contributors' rows is a union. What we lack is everything around that core: who contributed a batch, a unit that can be reviewed and reverted, review scaled by edit type, agents treated as bots (disclosed, scoped, on trial, stoppable), checks that run before a person looks, one shared configuration, and a position on sharing captured pages.
The chosen shape:
- The dataset is a git repository of append-only bundles;
graph.dbis an index rebuilt from them. Contributions arrive as pull requests and are checked by CI. A hosted server comes later, as another peer that writes bundles. - The first contributors are a small trusted team, each running agents. No public sign-up, voting or moderation queue yet.
dataset/
dataset.yaml packs pinned; scoring, resolver, source weights, domains; capture-sharing rule
contributors.yaml handle → ssh public key, role, agents and the scopes each is approved for
scopes/*.yaml shared scope definitions, changed by pull request
bundles/YYYY/MM/<id>/ manifest.json rows.jsonl captures/<sha>.txt.gz
A bundle is one closed changeset: its rows as stored (ULIDs are already
collision-free across machines), a manifest naming the contributor, the actor kind
of each row (human, assisted, autonomous), the tool and model, the intent,
the scope, the pack versions and the upstream head it was built against, and an
ssh signature. A row's status is not in the row: merge and reject decisions
travel as decision bundles of reviews, and a rebuild applies rows, then
decisions, in log order.
Roadmap¶
Slice 21 — Who ✅ done¶
Every changeset has an owner (D47b):
a handle, the agent acting for it, and a mode, resolved from kg --as, $KG_AS,
kg.yaml me:, else $USER. Schema 7 adds the owner, intent, scope and instance
to changesets, a name to reviews, sweeps and dispositions, and an
instance_id to meta. Each owner stages into its own changeset, which closes
once decided; imports and sweep documents get their own, and a sweep's belongs to
the researcher its results name. kg whoami, kg changeset start|list, and
--from on review, merge and reject; MCP takes who and staged_by.
Two refinements of D47's sketch: attribution lives on the changeset rather than on
every staged table (one owner per changeset makes per-row columns redundant), and
contributors.yaml moves to slice 23, since a list of names without keys verifies
nothing.
It found a real bug: an import merged its changeset, and its changeset was everyone's, so an import landed rows a person had staged by hand. The slice-9 and slice-10 goldens had passed on the back of it; they now merge their own work explicitly.
Slice 22 — The log ✅ done¶
A graph is written out as a dataset of bundles and rebuilt from it
(D47c): kg dataset
init|show, kg bundle export|list|show, kg rebuild --into. Export is stateless
(the dataset says what it holds) and seals what it writes; later merges and
rejections travel as decisions bundles; rebuild restores rows verbatim, matches
sources by URL, replays reviews for status, and refuses tampering, dangling
references and unloaded packs. The proof: every golden session, exported and
rebuilt, reads identically — every entity's page, brief and trace, the review,
every changeset's diff, the audit and the changeset list. Page texts travel only
for official and open sources; the rest are quoted and hashed, and a rebuilt audit
says "not held here" rather than "cannot be produced"
(D47d).
With a dataset, the computed settings are its, not each person's
(D47e).
The real run found a leak the design had not covered: four notes written while
using a proprietary list as a local-only channel mentioned it, and notes are graph
rows, so they went into the bundle (a scratch dataset; nothing was published).
kg keep-local now keeps rows, and whatever rests on them, out of every export,
and private_terms: in kg.yaml makes an export that would carry one refuse
(D47f).
Two things moved: "sweep plan survives a round trip" goes to slice 24 with the
scopes it needs, and a changeset nothing was written to is now dropped rather than
kept as an empty record.
Slice 23 — Contribution and review ✅ done¶
A dataset lists its contributors — roles, ssh keys, agents and their scopes — and
every bundle is signed (D47g).
Only maintainers decide: a researcher's or agent's work arrives staged upstream
(D47h). kg bundle verify is the CI
gate on every pull request — intact, signed, owned by its signer, agents in scope,
within the rules, and the dataset still rebuilds; a forger who rewrites rows,
recomputes every hash and re-signs is still caught by the quote the shared capture
does not contain (D47i). kg pull loads
the dataset into the working graph and keeps what is local
(D47j). Review scales with
the contributor: researchers' judgements wait for a maintainer, agents serve
probation per scope, a paused agent always waits
(D47k).
Rehearsed for real on a private GitHub repository with
Actions CI: a maintainer, a researcher, the maintainer's agent in one scope, and a
stranger. The researcher's and the agent's pull requests passed CI; the stranger's,
an unsigned one and a tampered one failed, each for its own reason. The maintainer
pulled, the agent's site waited on probation and was flagged as the researcher's
Hazel Yard, and the signed decisions passed CI as their own pull request. A fresh
clone rebuilt and read the same as the maintainer's graph on every entity. The
rehearsal found one gap, fixed: a graph worked with --dataset never learned which
dataset it belonged to, so review could not see who was a researcher; kg pull and
kg dataset init now record it.
kg revert for work already merged is deferred to the backlog: a maintainer can
reject a contribution before it lands, which is where review happens.
Slice 24 — Coordination ✅ done¶
The discovery loop is shared. kg scope share writes a scope into the dataset as
scopes/<scope>.yaml, and from then on the file is its definition. Local
changes are written through to the file for a pull request, and pull and rebuild
read it back; local-only channels never leave
(D47l). Every recorded
sweep opens its researcher's changeset, so where they looked and what they found
travel in their signed bundle. Verify fails a sweep of an unshared scope, and an
agent's outside its scopes (D47m).
kg sweep claim and kg sweep brief --claim take a lease on a channel. A live
lease refuses every other claim, including the same person's, and it runs out or
is given back when the sweep is recorded. Leases stay in the graph; across people
they wait for the hosted peer (D47n).
A compiled truth says which claims its writer had not seen, judged by the log and
not the clock, and review marks a contribution overtaken before it was sent
(D47o). kg log
says who contributed what, per contributor, agent and scope
(D47p). Schema 9. The proof
now includes every scope's sweep plan and the log: every golden session, with
its scopes shared, rebuilds and reads the same.
What building it found:
- A leak the tests caught. A sweep over a shared channel and a local-only one named both in its changeset's label, and labels travel. The label now names only the channels that may.
basewas taken at export, so a truth written before a pull was credited with having seen what the pull brought. It is now set per changeset, from when its last row was written.- Whose work a bundle carries is its changeset's instance, not the graph that exported it. A re-export made everyone's work look like the exporter's.
Next: from the data we hold, many points at once¶
The graph holds 105 data-center sites, and most of what is missing or out of date there is found and fixed one site at a time. The next three slices turn that around: find every gap in one pass, refresh a whole scope with agents, review the proposals in bulk, and ask questions of what is held. They borrow from Wikidata's constraint reports and Recoin, OpenStreetMap's Osmose and MapRoulette, OpenRefine, Prodigy, dbt freshness checks, and claim-verification work (SAFE, MiniCheck). GraphRAG libraries were surveyed (fast-graphrag, Microsoft GraphRAG, LightRAG, Graphiti, Cognee and others) and are not adopted: they extract facts by LLM and merge by rewriting, which the six hard rules forbid. The hosted peer moves to slice 28, where it can reuse slice 26's review flow.
Slice 25 — Gaps ✅ done¶
Packs say what every entity of a type should have: a field required in given
statuses, someone named as responsible, a plausible range, freshness by status
(D48). Every finding
now has a rule id and a severity. kg gaps counts a scope, a watchlist or a type
per rule and ranks a worklist. It adds what most peers hold and one lacks, and
kg gaps coverage lays a set out as a grid; a worklist saves as a watchlist
(D48b). A dismissed gap
stays out of the report and the brief until the entity changes, and dismissals
travel with their changeset
(D48c). Schema 10.
On the real graph, a private scope reads as 8 sites whose status source is too
old for their status, 5 unverified updates, 4 announced too long, and 1 site under
construction with no county, in a second.
What building it found:
- Rules need a status. 91 of the 105 real sites have no county, most of them operating campuses from Epoch. Required from the permit to energisation, the rule flags 12, each a real task.
- The set brief ignored everything but verify, contested and stale, so a 90,000 MW site read "ok". Gaps now flag and rank there too, weighted by severity, so a probable error outranks a stale value.
- A dismissed gap still showed in the brief and kept the entity ranked. The brief now honours live dismissals and says how many it hides.
Slice 26 — Bulk refresh and a review queue ✅ done¶
kg refresh brief turns a set's gaps into research tasks, one per entity and
property, dealt into briefs for several agents at once; kg refresh record stages
what they return as one changeset and logs an outcome per task. A search that
found nothing newer is remembered: marked in the report, ranked last, and held
back from the next refresh for 30 days
(D49). Every proposal is
sorted by whether its quote supports its value, by rules first (units, dates, a
pack's words for each stage) and then by a checker agent for what the rules
cannot read; it never merges
(D49b).
kg review --queue shows old against new with the quote, source and support,
and is decided one key at a time, in bulk by filter, or on a local HTML page
(D49c).
Status reads as dated milestones, and a status known only from when a source
mentioned it is a gap (D49d).
kg revert undoes merged work, waiting for a person first
(D49e). Schema 11.
On the real graph, a private scope's status refresh is 10 tasks over 23 sites,
each a real piece of work; one real site in 105 has a status with no date.
What building it found:
- An agent writes a day where the page gives a month. "Since July 2024" became 2024-07-05. The rules now say "the quote gives only 2024-07", which is exactly the edit the reviewer makes.
- A rejected proposal left its event waiting in review with nothing citing it. It now goes with the proposal.
- Milestones must stop at the current stage. A site that stepped back from
operational to construction would otherwise read as having reached
operational; the timeline and
verify.status_backwardreport the step back. - Two proposals from one page tied in the queue's order and sorted by their random ids, which made a golden flaky. The queue orders by locator and when each was staged.
- An undated newer figure from the same publisher contests the older one rather than replacing it (Cedar 400 MW, then 1.2 GW). That is D13d working as designed; it is in the backlog.
Slice 27 — Query and analysis ✅ done¶
What we believe is a derived table, current_values, with the claims behind
every row, and a view per type, v_<type>, one row per entity. kg sql (MCP
read op=sql) runs one read-only SELECT over them and every table, and SQLite
itself refuses anything else. kg query gains columns, sort, limit and
--as-of, and kg views export writes a file Datasette can open
(D50). Packs
ship named questions, checked by kg schema test, and a graph may save its own
(D50b). kg related ranks what
sits closest to an entity, each result with its route, computed and never stored
(D50c). Schema 12. On
the real graph the table is 1,889 rows, built in 0.3 s, and kg related <a developer>
--type organisation names its partners through the sites they share.
What building it found:
- A read-only connection still ATTACHes.
mode=roandquery_onlystop writes to the file, not ATTACH; an authorizer that allows only reading closes it, and SQLite, not a check on the query's text, is what refuses. - A PRAGMA's argument is not a write.
table_info(x)passes its table name as the argument; only the pragma's name says whether it reads. - A saved query is local. The round-trip proof first expected a query saved in one graph to be in its rebuild; like a watchlist, it stays where it was saved, and the proof compares pack queries.
- A column of claim ids is unreadable in a table.
kg queryshows how many claims stand behind each row;--jsonand--csvgive the ids. - Datasette reads the export as it is (spiked in slice 28, on a copy of the
real graph, bound to localhost): every table and view browses, sorting by
it_power_mwis numeric, all pack queries run as canned queries,sites_ofgets a form field for:org. The export now describes each table and view, and facets each view on region and status by default.
Slice 28 — A hosted peer ✅ done¶
kg serve serves the four tools over streamable HTTP, behind OAuth, with the
same handlers as kg mcp; it is a peer, not the database of record, and ships
with a Dockerfile and docs/HOSTING.md
(D51). People sign in with
GitHub; a login must be listed in contributors.yaml, and the token's handle is
who writes — who may only name their agent
(D51b). The peer
holds leases on channels and on refresh tasks under one write lock, and every
command line claims through it once the dataset names it
(D51c). It signs each person's
bundles for them with its own key, holds no role, and opens a pull request per
person; CI verifies them like anyone's
(D51d). This is
the claude.ai path D2 deferred, and it completes D47.
What building it found:
- A declared handle cannot survive a shared server.
wholet anyone be anyone; now the token decides, and a person on claude.ai is<handle>/claude, an agent like any other — its probation applies (D47k). - A decision on someone else's work was signed as theirs. Exporting one person at a time put Ann's merge of Ben's claim inside Ben's bundle, signed for Ben. A bundle now carries only its owner's decisions; Ann's follow in a decisions bundle of her own, in a second pass.
- A lease claim raced. Check-then-insert let two writers both see a channel free; the claim now takes the write lock first, and of 20 at once exactly one wins.
- A server must not read a person's settings.
load_configread~/.kg/kg.yaml; the peer points every call at its own settings file, and a call may not name a file on the host at all. - The first live check, from claude.ai, worked on a copy of the real graph
(a GitHub App signing in the maintainer, through a tunnel),
and asked for two things: the same data in a browser, and plain relation names
in the table. Datasette now sits at
/databehind the same sign-in, and an incoming relation isowner, not← data_center.owner(D51e). - Datasette sees only views in the file. Temporary views on its connection
do not show as tables, so the
v_<type>views are kept in the graph, rebuilt with the table. - The MCP SDK already has everything a peer needs — OAuth server routes, dynamic client registration, token checks, Starlette and uvicorn — so the slice adds no dependency.
Slice 29 — Time and identity you can resume from ✅ done¶
The goal of kg is that any agent — a coding agent, a deep-research run — stops and picks up from its last checkpoint as if it had never stopped. The checkpoint is the brief, so it must say what is true now and must not ask again what was decided. Four backlog items broke that; this slice fixes them, and makes the Datasette pages say what they show.
- Dates compare by the span they name, and a source recounting an earlier stage on its way to a dated later one is telling history, not disputing itself — where the pack's status machine says the one leads to the other (D52).
- A value can end (
--ended-on D,--ended-by D), which is not a retraction: gone from what is current, still there as of an earlier date, marked "may have ended by D" before an upper bound (D52; schema 13). - A rejection named at creation is kept as a not-same; a different town or
county counts against a match without vetoing it (
identity.separators); and a sweep candidate that looks like an earlier one is pointed out (D53). - The data pages say what they show: a front page, readable views with
column descriptions, the internals hidden, ids as links to an entity page with
the quote behind every value, and
kg views browsefor a local graph (D54).
What building it found, on a copy of the real graph:
- A cancelled project now reads as cancelled, with no dispute.
- An announced campus reads as announced, with construction as an unverified update. Its only construction source is one local-news report, which the article's own recounting of the announcement had been corroborating. D6a is right to wait for a second source, and the brief now asks for one instead of a dispute.
kg dupesover the data centers fell from six proposals to one. The five that went were each one owner's sites in two towns (four Google pairs, and CoreWeave's two Texas sites). The one left, Huawei Wuhu and Horinger, has no town recorded on either side.- A developer's edge to a campus it left, retracted before, ends with
--ended-by 2026-06, which says what the source said. - Validity dates had been compared as text since slice 1.
2026sorted before2026-06-12, andvalid_to: 2026expired on 2 January; nothing showed it until a status was dated to a year. - An undated restatement cannot be told from the present tense without a stage order. "Announced last July, now under construction" and "began in 2025, now operational" look alike; the status machine is what says which way the story runs, so the rule applies to status only (BACKLOG).
- Review keeps its safeguard. A not-same staged with an entity is the agent's word: review still shows the pair to a person until that decision is merged (D33c).
Slice 30 — One prompt out, one report in ✅ done¶
A deep-research run should start where the last one stopped, with no chat history, and look where the last one did not. The researcher should not need kg: one that has to call our tools, or return our JSON, researches less. So the graph stands on either side of the run, with no new command (D55).
kg sweep brief <scope>(no--channel) is one prompt, as data and text:- the topic, what we hold and what is settled;
- what to find, ranked, with the findings behind each gap and a plain question;
- what an earlier run found that waits for review;
- leads and open questions;
- each channel's playbook, lessons and what the last run said of it;
- what was tried and came up empty;
- how to answer: a normal cited report ending in WHERE I LOOKED.
- Nothing local is in any brief, and a prompt that mentions a private term is refused.
kg sweep recordtakes the report back:- the pages it cites, fetched under the new
fetch: recordand checked against the page; - searches (
outcomes), leads, lessons and new channels; - the report itself.
A cited page that cannot be read becomes a search that came up empty. The entity brief shows what was tried (schema 14).
What building it found:
- Every brief leaked.
sweep brieflisted the 9 local-only candidates from the private list under ALREADY DECIDED. The refresh and support briefs, and--claimto a peer, would have carried kept-local rows. Nothing filtered text meant for a researcher; only export did. - The real test, on a copy of the real graph.
- Prompt 1: 157 lines where the old briefs ran to 1,300. It carries none of the 9 names found only on the private list: 7 are members held from public sources, and 2 are absent. It has no private term and no private channel.
- The research run: given to a web-research agent with no kg access, it returned a real report (68 tool calls) ending in WHERE I LOOKED. That section gave every source with its outcome, 8 leads not followed and 3 tips on working a source.
- Recording the report:
- a partner's page was fetched live and its quote staged;
- a withdrawal and a site going live were staged, and wait for review under the confirm policy;
- one site gained a third developer source and its expected tenant;
- 2 new candidates, 7 leads, 3 lessons and 2 new channels were recorded;
- one quote the report gave was not on the page it cited, and was refused by name. That is the case for reading the page, not the report.
- Prompt 2:
- everything run 1 answered or searched left the task list, and the two proposals it staged are listed as waiting for review instead of being asked again;
- sites run 1 never reached came up the list;
- the new channels carry their lessons and run 1's notes;
- ALREADY TRIED lists the three searches that found nothing newer.
- A status proposal waiting for review is not a gap to research. The first version of prompt 2 sent the researcher after a withdrawn site's status again. It now holds such gaps back and names what waits.
- A task's question named our JSON fields (
valid_from,edge). A researcher who returns a report gets a plain question.
Slice 31 — Nothing in a report is lost on the way in ✅ done¶
Recording run 1 was the weakest step of the loop. It was done by hand, and nothing checked that it was complete or that the report's quotes were on the pages they cited. The engine now does that bookkeeping (D56); turning a report into claims stays the recorder's work (D16).
kg check --report <file> --scope S --out DIR(MCPcheck op=report) writes nothing to the graph. It:- reads every page the report cites, once, and saves it;
- checks each of the report's quotes against the pages cited beside it;
- lists the members each page names;
- writes a results skeleton with one document per page read.
kg sweep recordaccounts for every URL the report cites: a document, a candidate, a lead, a note, orskippedwith why. One that lands nowhere is kept as a lead.- Also in this slice:
- a gap a run confirmed is held back like one it searched;
- hard rule 6 no longer trips over a space that stripped markup left before punctuation;
- an exact name is an alias match even when stripping empties it.
What building it found:
- Run 2, on a copy of the real graph. It started from the prompt run 1 left, researched with no kg access (70 tool calls), and went where run 1 had not: an announcement naming a tenant at two sites, a retrofit that answered an open question, a provincial register naming the developer of three energy parks, a second independent source for a withdrawal, and three new candidate sites abroad. (The scope is local-only; its findings are not published, D65.)
check --reporton run 2's report:- 38 URLs, 34 read;
- 37 quotations with a page to check against, 35 on it. One of the 2 not found is a real misquote: a local broadcaster's sentence with a dollar figure silently cut out. The other is a figure the page shows only in counter elements;
- two pages came back as shells ("Loading…") and are listed as not read;
- recorded with 0 of 38 URLs left over: 7 documents, 2 candidates, 8 leads, 18 skipped with a reason, 3 in notes.
- The first check was wrong 6 times out of 8. Quotes shortened with an ellipsis, a closing full stop, a space left by a stripped link, and one quotation mark pairing with the next all read as "not found". A report's own quoting habits have to be allowed for before its reliability can be judged.
- An exact name failed to match. A document about two sites named only for their operator and their town staged nothing: their names are those two words, which normalisation strips to nothing, so the alias layer never compared them. It is fixed and held by a fixture. Recording by hand had hidden it: run 1 never quoted those sites.
- Prompt 3 holds back everything answered, confirmed or searched, and moves on to the sites not yet reached. One gap still comes back: an unverified value a run showed to be wrong (Mortenson, a contractor, as Stargate Abilene's developer). The results have no way to say so yet (BACKLOG).
The UK data centres scope, Scotland first (slices 32–39)¶
About 24 hyperscale proposals are moving through Scottish planning, mostly SPVs of two developers. This scope is built to support the people scrutinising and resisting them. What they say they lack: - deadlines they can act on; - decisions and call-ins; - the developers' claims side by side; - who is behind each company; - how their representatives voted.
Every value is still quoted from a primary source.
| Slice | What it adds |
|---|---|
| 32 ✅ | Scottish planning read from the councils' own portals and the DPEA; the scotland-data-centres scope; the open-for-comment view; a public read-only site |
| 33 ✅ | A map, and claims under scrutiny: each application placed (PlanIt), each site derived from its first; MW, floorspace, height, backup generators and fuel, water, heat, jobs and cost quoted from the developers' own documents (PDFs); the documents tab as leads; a page read once, a refusing server left alone |
| 34 ✅ | How much of an outside list we hold: a newsroom's map as eval data, recall per list; channels beyond planning (operators, press, SPICe); region from the council |
| 35 ✅ | What it cost to make this: each run discloses what it used, whatever ran it; kg footprint estimates energy, CO2e and water as cited ranges; a page on the site |
| 36 ✅ | Who is behind it: the Companies House API's control records, a chain of controlling companies per applicant, a family's siblings confirmed by control; people counted, never named |
| 37 ✅ | How their representatives voted: MSPs and every member's vote on the data-centre motions, the councillors elected for each site's ward, and a committee's named vote read from its minute; who decides each application; people named only for what they did in office |
| 38 ✅ | England and Wales: one planning importer for every portal product (Idox, Atrium, Agile, Ocella) and casework service (the Planning Inspectorate, the national infrastructure register, PEDW); PlanIt's search finds applications as candidates of each nation's scope; a site speaks of its own government |
| 39 | England's and Wales's representatives: MPs by Westminster seat, English councillors across their election years, and the Senedd |
Slice 32 — Scottish planning, and a public site ✅ done¶
D57:
- The pack models Scottish planning:
- PAN, EIA screening and scoping, PPP and full permission, appeal, Ministerial
recall and EIA direction, chained by follows;
- deadlines dated by the day they were read;
- counts of representations, objections and support;
- eia_required;
- the council.
- kg import scottish-planning reads each application's tabs on the council's
Idox portal, and each DPEA case, as cited official records. The rules:
- the site must already be held from research;
- the council is claimed only where the page names it;
- never who wrote in: a capture is only the rows read, the comments tab
only its counts, and an applicant only if it is a company with no person's
title in it.
- Deadlines first: the Scottish channels apply to a scope defined on
region=Scotland before it has a member. open_for_comment,
decisions_due and recent_decisions run on today(), the graph's own
clock. The research prompt opens with what is open for representations.
- kg views export <dir> --site --scope S writes a static, public,
read-only site. It refuses a page that mentions a private term or names a
titled person.
What building it found, on a copy of the real graph: - The seeding run. A web-research agent without kg found 27 proposals across 17 councils. Five were not on the campaign tracker, and a dozen corrections came from the portals themselves: - a PAN reported as a permission; - deadlines that had moved; - three links on the tracker that pointed at the wrong applications.
kg made 25 sites from their councils' own pages (East Lothian's portal
returns no table). It read 50 applications and appeals from 188 pages,
across 15 council portals and the DPEA.
- One application was open for comment the day it was read: DataVita's
DV4 at Chapelhall (26/01110/PPP), until 28 September 2026.
- Two privacy leaks were caught and closed:
- Whole pages. A council's details page names agents and officers, and
its comments pages list residents. So the importer captures only the rows
it reads, and tests plant invented people to prove they are never stored.
- A person inside an applicant field. One portal gives the applicant as
a person's name joined to a company's; it passed the "is it a company"
test because it ends in "Limited". The importer now refuses any applicant
with a personal title, and the site refuses to write a page naming a
titled person. The site's own scan is what found it.
- Outcomes are not permissions.
- A screening answering "EIA not required" had read as "granted", and a PAN
acknowledged as "agreed" as "granted". Both now read as what they are.
- Whether an EIA is required is its own value. Ministers' directions
(Auchtertool, Wester Hermiston, Westerhill) override the councils'
opinions.
- No page says a site is in Scotland. Region is derived from the council
each page names, as a derived claim with its input. It is not cited to a
page that does not say it.
- Five councils' certificates failed Python's checks: they send no
intermediate certificate, or chain to a root newer than Python's bundle. kg
now verifies the way the operating system does (truststore), and still
refuses a bad certificate.
- The report check had to be polite too. Its first run asked for 76 pages
at once and 66 were refused. Paced per host, 67 were read: 11 of the
report's quotes were found on their pages, and the twelfth cites a page that
was still refused, so it is reported as unchecked, not as missing.
- A new scope had nowhere to look. Its channels waited for a member in
Scotland. The scope's own rule now selects them.
Slice 33 — A map, and what the developer says ✅ done¶
D58:
- Read a page once. Every request is logged in reads (schema 15).
- A page read within 20 hours is not read again; what was kept of it is used.
- A server is asked for at most 60 pages a day.
- A server that refused is left alone until the next day.
A server is the address a host resolves to: six councils share one Idox
front door. The same rules apply to kg check --report and kg sweep record.
- A map. scottish-planning reads PlanIt's point for each application (an
aggregator, and only the identifier, place and link are kept). A site is
placed, as a derived value, at its earliest application's point or at its
own quoted grid reference (OSGB36 to WGS84, in pure Python). A placed site is
never moved, and an unplaced one is never geocoded.
- What the developer says. fetch reads PDFs (pypdf) and refuses scans.
The documents tab's planning statement, design and access statement, EIA
summary, technical reviews and consultees' responses become leads naming the
tab they are opened from. The pack gains the properties campaigners compare.
- The public site leads each site's page with the developer's figures,
saying "not stated" where the documents are silent. It adds a Leaflet map,
sites.geojson and applications.csv.
What building it found, on the real graph: - The councils had stopped refusing. One pass the next morning read 222 pages: 12 more sites (24 of 26 now held), and the applications of the others, refreshed. Six councils' portals resolve to one Idox address, and that server's 60-page cap stopped the run mid-North Lanarkshire, as it should. PlanIt asked for slower requests (429) after 23, and was left alone. Dumfries and Galloway still refuses. A second run through the CLI read nothing at all: 170 pages reused, in three seconds. - Nine sites placed on the map from PlanIt's points. The rest wait for PlanIt's next day. - A document list can name a person. Fife's documents tab listed an email by its sender's name, and "screening opinion" in its title let it through. It is kept local, and correspondence is now never listed, including from a reading reused from the log. - A scanned PDF is not a refusal. An answered page with nothing usable in it had counted against its server; it no longer does. - The developers' own documents disagree with each other. Twelve were read for Larbert, Cato and Greenock, and 23 figures recorded. Larbert's planning statement needs about 1.3 million litres of water to fill its cooling system, and its own EIA chapter about 5.9 million: the site shows the figure as disputed. The statement provides a 48-hour diesel supply, while the EIA's air quality appendix models the generators' emergency operation for 72 hours, and lists 200 generator stacks. That appendix is the only place the generator count can be read, so it is recorded as derived (one generator per listed stack). Cato and Greenock state no megawatts and no generator count, and the site says so. - Greenock is placed from its own document. PlanIt has no point for it; its screening request gives a lettered grid reference ("NS 23213 74321"), which the converter now reads.
Slice 34 — How much of an outside list we hold ✅ done¶
D59:
- An outside list is a channel. Its names are candidates, each ends in a
disposition, and kg sweep plan and the research prompt count how much of
each list the scope holds. There is no new command.
- The Scottish channels look beyond planning: the operators' own site
lists, the Scottish press, and SPICe.
- Region comes from the council, by the pack's place list, in the
importer's finishing step.
What building it found, on the real graph:
- Checked against the BBC's map ("Data centres around Scotland", 15 September
2026, 39 points). The baseline was 20 of 39 names held (51%).
- Three research prompts, each written by kg sweep brief for a web agent
with no kg access, went to the operating estate, to proposals not yet in
planning, and to anything else the press and SPICe name.
- They brought it to 32 of the 34 in scope (94%).
- Two names turned out to be Atos offices, not data centres. Three are
duplicate rows: Atos and Asanti's Livingston are one building,
"Edinburgh South Gyle SC-2" is no Pulsant name, and "Glasgow DV2
(extension)" is DV3 at Chapelhall.
- One is unsourced (Edinburgh Park) and one is open (RBS Macmerry, whose
council application the portal reader has still to read).
- The scope went from 23 sites to 39. 16 new sites were recorded, among
them 9 operating data centres, from Pulsant's three to Brightsolid's two.
- The gap was where we looked, not what the engine does. Every Scottish
channel had been a planning channel, and the seeding had kept only sites with
an application.
- The BBC's list is not a gold standard: two points share a coordinate,
one site sits at another's, and one building appears under two names.
Recall counts what we checked and found, not whether the list is right.
- A site placed by its postcode. Operators' pages give an address, not a
nation. The pack's postcode areas now derive the region: EH, G, AB and the
rest, with TD15 in England.
- An engine bug, found by rehearsing on a copy first. Confirming an entity
by id released waiting claims across the whole graph. On the copy, it
merged the name of an organisation in another person's unreviewed
changeset, whose entity was itself still waiting. Release now covers only
the claims on the entities just confirmed (test_release.py).
- The follow-up the same day:
- The last BBC names were settled: 33 of 34 held (97%). The one left is
Edinburgh Park, which no page says is a data centre now.
- Four more leads were read: EPCC's 38 MW Advanced Computing Facility and
NatWest's Melville Gate were added. IFB's Altens site (IFB moved to a
partner's) and Deep Green Edinburgh (a directory's entry only) are
unsourced.
- Six operating sites are on the map from PeeringDB's facility records, cited
as an aggregator. Each record's own point is used, never its operator's
head office, which the same record also carries.
- Two unreviewed runs from a private scope, merged by mistake earlier, were
rejected with kg revert.
Slice 35 — What it cost to make this ✅ done¶
D60:
- Whoever ran a research run says what it used, in one shape whatever ran
it: counts, and how they are known. known: unknown is an answer, for a
chat app that shows no counts.
- It goes in run.usage in a sweep's results, or through kg usage add.
- kg usage read turns a Claude Code log, Gemini CLI telemetry or saved API
responses into it.
- A dataset can ask for it (disclose_usage), and kg bundle verify warns
on a sweep that says nothing.
- kg footprint estimates it on every read, as ranges:
- EcoLogits on output, the floor;
- kg's own cited term on input, shown apart;
- a session that also built the tool (part: tooling), shown apart too.
What building it found, on the real graph:
- The Scottish scope's five research runs (two source surveys, the first
run, the three runs against the BBC's list, and the leads run):
- They read 23 million tokens, 22 million of them from a cache, and wrote
150 thousand.
- Estimated: 0.8–4.0 kWh (central 2.2), 0.3–1.5 kg CO2e and 3–16 L of water.
- The session that ran them and recorded what they found also built slices
32–35. The two cannot be split.
- It read 390 million tokens from a cache and wrote 808 thousand.
- Estimated: 4.8–52 kWh (central 23), shown apart as tooling.
- Almost all of it is reading. EcoLogits, which counts output only, gives
3.0–5.8 kWh for everything. kg's input term adds 2.6–50 kWh. The width of
that range is how much nobody outside the companies knows what a cached
token costs.
- A Claude Code log keeps a response's usage from before it finished. In
the runs of 28 September, only 8 of 160 responses carried a final output
count. The reader estimates the rest from the text written, and marks the
run estimated.
- EcoLogits 0.11.1 has no size for Claude Opus 5.5. It is counted as Opus
4.8, which EcoLogits' own later model list sizes identically, and every
output says so.
Slice 36 — Who is behind it ✅ done¶
D61:
- kg import companies-house-api reads the Companies House API for each
company behind a scope's sites. Each company controller becomes a
controlled_by edge, dated and saying what control, and the chain is
followed up to one registered elsewhere.
- A family's siblings are confirmed by control, never by name. A sibling
with no site is a lead.
- People are counted, never named: individuals with significant control and
directors become counts and the control they hold. The site links to the
register.
- The key comes from COMPANIES_HOUSE_API_KEY, and the API has its own
polite limits.
- Where it shows: kg path from a site to the top of its chain, and the
site's "Who is behind them" page.
What the real run found (29 September, 60 register pages):
- All six Apatura applicants trace to one parent: each is controlled by
Apatura DC Ltd, which is controlled by Apatura Ltd, which is controlled by
Felstead Ford Limited (over 50%). kg path runs from Neilston to Felstead
Ford in five steps.
- Six more Apatura DC Project companies (2, 3, 4, 7, 8 and 10) are confirmed
by their own control records and have no known site. Each is kept as a lead.
- Other chains:
- Shelborn Drummond → Shelborn Edinburgh → Shelborn Investments;
- SDCL's LLP to a Dutch company, where the chain ends;
- Thistle Sands, which is controlled by individuals only.
- Fourteen names had no exact register match. Most are brands (Pulsant,
DataVita, iomart). "Slate Islands Development Ltd" is a near miss for SLATE
ISLAND DEVELOPMENTS LIMITED (SC680122). Each is kept as a lead, not guessed.
- Every person is counted, never named. 29 people are on those companies'
records. Afterwards, none of their names was anywhere in graph.db.
- A fix the real run needed. The first pass held five control records back
as possible duplicates: sibling SPVs were held without their numbers, and the
parent's name was fuzzily like theirs. The importer now reads every
company's own record first, the ones the graph already holds by name first
of all. The first pass was reverted (kg revert) and run again, reusing its
readings.
- The first key was a test application's, which reaches only the sandbox
(the register answered 401). A live application's key worked.
Slice 37 — How their representatives voted ✅ done¶
D62 and D62b:
- An elected representative is named for what they did in office, from the
official record, and nobody else is. Officers, agents, residents and people
with significant control stay unnamed; the site's titled-person check steps
over the office holders it holds, and nothing else.
- kg import holyrood reads the Scottish Parliament's open data: each MSP's
party and seat as dated spells, every member's vote in each division on the
motions listed, with the words each was on, and the questions and motions that
mention data centres, with their answers.
- kg import areas places each site's point in its ward, constituency and
region (MapIt), and the representatives query joins them to who sits for
them by GSS code.
- kg import councillors reads who was elected for each council
(Democracy Club). A councillor named like someone already held is set aside
as a question, never joined by the name.
- kg import committee-votes records a committee's vote from a
transcription of its minute, checked word by word and name by name against
it. The minute is never kept.
- Who decides an application is decision_level, from the portal, a
minute, an agenda or a DPEA recall.
- The site gains "How their representatives voted", a "Who represents this
site" section on each site page, and who decides each application.
What the real run found (29 September):
- Holyrood. 196 MSPs, sitting and former, from the Parliament's own data,
and four divisions: NPF4 (S6M-07442, 11 January 2023, 119 votes) and the
three on S7M-01177, "Hyperscale Data Centres" (16 September 2026). The SNP
amendment (.5, 72–32) replaced the moratorium before the motion was put, and
Labour's (.3, 94–26) added to it; the motion as amended was agreed 80–26. The
site says the last division was on the amended words, and quotes the
moratorium only as lodged. 83 questions and motions mention data centres.
- Sites and seats. 16 of the 42 Scottish sites have a point and so a ward,
constituency and region; 26 have none, and nobody is shown representing them
until they are placed.
- Councillors. 796, across the 17 councils the scope's sites apply to.
Twelve were set aside as named like an MSP held (in one case two councillors
in different councils share the name of one MSP), and four more held back as
close matches: all kept as questions for a person.
- Committee votes. Edinburgh's Planning Committee divided 4–7 on 17 June
2026 ("Data Centres Moratorium"): both sides agreed the council would not
impose one, and the amendment carried asks the Scottish Government to declare
a moratorium until it defines a green data centre. South Gyle (25/04239/PPP)
was heard by the Development Management Sub-Committee on 4 February 2026,
with the officers recommending it be granted; the council refused it, and no
minute with a named vote is published (the council links the webcast). The
appeal is recalled: Ministers decide it, and the DPEA's target date has moved
from 28 September to 20 November 2026. North Lanarkshire's committee system
did not answer.
- Three fixes the real run needed.
- The Parliament marks a seat no longer held "Not Current": the first pass
read that as a candidacy and dropped every former member's seats.
- The first councillor pass joined eleven councillors onto MSPs by their
names alone, and one more by a name the resolver normalises alike. Both
passes were rejected, and namesakes are now asked of the resolver and set
aside.
- One MSP's motion quotes a company founder by title; the site gives it by
reference and link, and withholds its words.
- Nothing personal was read: no photograph, birth date, gender or
nomination paper is in graph.db, and the minute read was not kept.
Slice 38 — England and Wales ✅ done¶
kg import planning reads planning in all three nations; scottish-planning is
the same importer under its old name, and Scotland's output is unchanged
(D64):
- Council portals, a reader each: Idox, Atrium registers (three skins, and a
disclaimer agreed to once per council, and said), Agile Applications (its JSON
record) and Ocella. Each quotes its own labels and keeps a whitelist of rows;
any other product is said to have no reader.
- Casework: the Planning Inspectorate's appeals on both its services (an
inspector, or the secretary_of_state), the national infrastructure register
(a data centre directed in is a dco at its nsip_stage) and PEDW (a
Development of National Significance, welsh_ministers). The day to comment is
comments_until, an inquiry's hearing_at.
- Finding: search: planit records every hit as a candidate of its nation's
scope — matched, excluded by the scope's declared rule, or open. A finder may
exclude a candidate by a rule the scope declares.
- The pack knows England's and Wales's councils and postcodes, and seven
channel templates for them; an application's easting and northing places it;
a site for England or Wales speaks of the Planning Inspectorate or PEDW, never
Scotland.
What building it found (D64b): - Idox is most councils, not all: of 171 substantive data-centre applications since 2023, 102 are on Idox; Atrium, Agile and Ocella bring it to about four in five. Arcus, Tascomi, NEC and Acolnet are left to a person. - England's words fixed twelve Scottish applications: five whose references say nothing get their kind from their own words (four EIA screenings, now answered rather than granted), and seven gain the comment deadline their council labels as England's do. - The Planning Inspectorate moved to a new service, and a case started before 2026 is only on the old one. The new service's search lists appellants by name, so only its case pages are read. - The first real search recorded 708 applications as candidates: 647 in England (247 excluded as not a proposal, 400 open, 69 of them large) and 61 in Wales (18 excluded, 43 open, 5 large). The large ones group into about fifty places — DC01UK, Abbots Langley, the Iver sites, Arena Essex, Cambois, Wilton, Hayes, Park Royal, Didcot, Waterton, Newport — proposed as sites for a person to review before any is recorded, as in slice 33.
Slice 39 — A public release ✅ done¶
The repository was a private build log; it is now a tool someone can install,
learn and run (D65):
- Installable anywhere. The packs ship inside the package, so uv tool install
gives a working kg; with no packs found it says where it looked instead of
loading an empty schema.
- One layout. examples/ (the demos), docs/ as a site — getting started,
guides, reference (the design, a CLI reference generated from the CLI, MCP,
packs), decisions, and this project's roadmap, backlog and history — and data
in dataset repositories, never in the code repository.
- Public basics. Apache-2.0, a NOTICE, contributing, security and conduct
pages, CI (tests, packs, the CLI reference, a strict docs build, the release
check), llms.txt, and a README for a newcomer.
- Nothing private. scripts/release_check.py fails on a home path, a key, an
email, a tracked graph, or a local private term. What derived from a proprietary
list or a private scope was removed, and redacted in place in seven decision
records. A dataset's CI installs kg from the public repository.
- The backlog triaged. Eight stale rows closed, quote_locates fixed (an
absent quote locates nothing), and ten rows marked for slices 40 and 41.
What building it found: - Every relative link now resolves, and is tested. Moving the docs touched every cross-reference; a test now checks every link in every markdown file, where before it checked only links to decision records. - A wheel had no packs. Installed outside a clone, kg loaded an empty schema and said nothing.