docs/repository-reconstruction.md
First uncontrolled ingestion
raw reality → canonical model → projection → visual audit, run against a real
repository that knows nothing about this system.
Target: /Users/jlv/Enterprise XI — 115 TS/TSX files, 50 commits, 2 authors.
Not prepared, not annotated, not chosen for fit.
read 115 files, 50 commits, 38 import edges
emitted 662 observations (evidence=460 convention=202)
ingested 662 facts over 117 subjects (measure=345 placement=115 exchange=202)
gaps 0
REFUSED 38× import dependency
missing: a binary STATE family (2-ary tuple, persistence until-change)
Outcome: reconstruction succeeds with zero gaps and zero manual shaping — and the experiment produced a finding the theory predicted and had not yet met.
Success criteria
1. Every visible claim traces to a source fact — met
662 facts, each carrying an observer and a citation naming the exact command that
produced it (git ls-files: <path>, git log <sha>). No fact exists without one.
2. Unsupported interpretations refused or marked — met, and this is the finding
38 import edges were refused rather than coerced.
An import is a persistent directed relation between two subjects. The
vocabulary offers three 1-ary states and exchange — which is an occurrence,
zero persistence. Emitting an import as an exchange would assert that a
dependency is an event, which is false and would make every import re-separate
on every observation.
The missing cell is a binary STATE family.
minimal-ontology.md predicted the family enumeration was incomplete and named the unary occurrence (a heartbeat) as the missing case. This is the mirror cell, predicted by the same table and met here for the first time in real data, not in a thought experiment.
| 1-ary | 2-ary | |
|---|---|---|
| state | condition, measure, placement |
— missing — ← imports |
| occurrence | — missing — ← heartbeat | exchange |
Both empty cells of a 2×2 are now evidenced. That is stronger than either alone, because a single gap invites a patch and a symmetric pair indicates the enumeration itself is the wrong shape — which is what the reduction argued.
And Gap could not express the refusal. All four of its reasons —
unknown-condition, unknown-subject-kind, undeclared-condition,
undeclared-metric — mean "you did not declare this", which presupposes the
observation is expressible. A refusal means the vocabulary cannot hold it at all.
So refusals are returned on their own channel. Gap was not extended, per
the directive not to broaden the ontology to make things pass.
3. Discovered something not manually encoded — met
churn leaders:
9 commits src/components/Nav.tsx
8 commits src/components/Footer.tsx
7 commits src/app/layout.tsx
5 commits src/lib/auth.ts
files touched by >1 author: 30
files with NO commit in the indexed history: 0
Nothing named Nav.tsx as significant. It surfaced because a measure derived
from history ranked it. Nav, Footer and layout are the shared chrome —
the churn ranking recovered the coupling structure of the codebase from commit
co-occurrence alone.
Interpretation is separated from observation
Every emission carries a warrant, and the split is 460 evidence / 202 convention (31%). Two conventional readings, both declared:
| Mapping | Warrant | Why |
|---|---|---|
file → measure bytes |
evidence | measured directly |
directory → placement |
evidence | containment fits placement exactly, no judgement |
commit → exchange (author → file) |
convention | defensible — a commit does move authored content — and still a reading |
| stale after 90 days | convention | nothing supports 90 over 60 or 120 |
The threshold is isolated in one exported constant so the conventional surface is countable. By semantic-typing.md a convention cannot be false, only unuseful, so nothing downstream can detect it — countability is the only available defence.
The grammar over the generated world
scene derived from emitted kinds: measure, placement, exchange
R2 proximity-invented
containment is categorical and position encodes proximity.
R8 warrant-unencoded
the scene renders a conventional value with no warrant channel.
R2 fires again, on a completely independent pipeline. The WorldScene audit found position unlicensed in the existing renderer; the same rule catches the same class in a world built from raw git data. One defect class, two pipelines, no shared code — which is evidence the rule is finding something structural rather than one team's habit.
R8 fires because the commit-as-exchange reading is conventional and no channel declares it. A viewer could not distinguish "these two files were changed together" (measured) from "a commit is a transfer of work" (a reading).
An instrument error I made and corrected
The first run declared the scene by hand, including a stalled channel. The fact
tally showed zero condition facts — no file in this repo is 90 days stale — so
the audit was describing a world the pipeline had not produced, and R8 fired for
the wrong reason.
The scene is now derived from the emitted fact kinds. R8 still fires, on the 202 conventional exchanges, which is correct. Same substitution defect as the earlier accent-provenance miscount: an instrument measuring something adjacent to its claim.
Standing
| Criterion | Result |
|---|---|
| reconstruct without manual shaping | yes — 662 facts, 0 gaps |
| refuse rather than coerce | yes — 38 refusals, Gap not extended |
| discover something unencoded | yes — churn structure |
| grammar catches the projection | yes — R2 and R8 |
| ontology broadened to make it pass | no |
The transition is demonstrated. raw reality → canonical model → projection → visual audit runs end to end on an unprepared repository, and the confident
hallucination the grammar exists to prevent did not occur: the one phenomenon
that did not fit was refused in the open.
What is still not established
- One repository. A TypeScript Next.js project with 2 authors and 50 commits is not a sample. A monorepo, a polyglot repo, or one with 10⁵ commits would each stress a different part.
- The import refusal is the honest answer and not a useful one. The most interesting structure in a codebase is its dependency graph, and the reconstruction currently discards it. Refusing is correct; it is not free.
- No world was rendered. The grammar ran over the scene the facts license, not over pixels. Producing an actual visual from this world is the next step and it is not done.
- The
stalledbranch is gated but not exercised against real data, since no file in the target crossed the threshold. - WorldScene channels still unaudited: elevation, beacons, labels, wireframes.
174 tests, tsc clean.