D43 — A demo is an investigation, run through the real CLI, and tested¶
- Status: Accepted — amended by D65 (the demos are
examples/, one investigation per data product) - Date: 2026-09-22
- Origin: slice 16
- Area: build
Decision¶
Each pack has one demo in demos/: a shell script that tells one investigation
from start to finish, printing each kg command before running it and a short
reason before each step. It builds a fresh graph in a temporary directory from the
captured sources, makes no network request and never touches the user's own
graph.db.
A demo is tested like product code. tests/unit/test_demos.py runs each script
end to end and asserts that every beat its narration promises actually happens —
the refusal it says will happen, the count it cites, the question it says reaches
the next session's brief.
Why¶
After fifteen slices both packs worked end to end on real data, and nobody could see it. The golden sessions are per-slice feature tests: they prove a rule, not a story. There was no README, and no single thing a person could run to watch an investigation happen.
Golden sessions were the wrong vehicle. They run through the MCP handlers, pin the date, and their value is a byte-exact snapshot; a demo's value is being read by a person, and it has to show the commands they would type. So a demo drives the CLI, and its test checks meaning rather than bytes.
Writing the two demos found four things the goldens had not, because a demo is read as a narrative and a mismatch between what it says and what it shows is glaring:
- the question the UK demo parks for the next session was staged and never merged, so the brief said "nothing needs attention" directly under a paragraph claiming the opposite;
kg auditstated its verdict only when there was nothing else to report, so on any graph with a source read twice it never said the archive was clean — the slice-14 golden had been claiming a verdict its own output did not contain;- the demo's first compiled truth placed the campus in a council area the source never names;
- "61 of 67 companies share this office" is true of the extract and an artefact of how it was cut. The narration now says so, and gives the full-register figure.