Skip to content
← Documentation

docs/generated-worlds.md


Worlds generated from facts

The boundary bug, closed. src/lib/world/from-facts.ts, tests/from-facts.test.ts, tests/generate-world.ts.


The criterion, met

Two repositories, neither configured for this system, neither known to it:

Enterprise XI   files 115 · commits  50 · facts 662 → districts 43 · buildings 113 · agents 2 · links 1327
xi-hq           files 134 · commits 185 · facts 874 → districts 29 · buildings 128 · agents 1 · links  835

structurally different: YES

Different because the facts differ. No PRODUCTS, no AGENTS, no configuration between the two runs. Enterprise XI has more directories and fewer files than xi-hq, and the worlds say so.

Compare the old path, where 9 repositories and 80 repositories both produced 18 buildings.

What is derived from what

Visual Semantic quantity Evidence, carried on every building
district directory path containment (placement facts)
building file repo/bytes observed
height size height from repo/bytes=…
brightness churn activity from repo/commits-touching=…
position co-change coupling position from co-change coupling
link co-change frequency co-changed in N commit(s)
agent commit author observed as a commit author

Every building states the evidence behind its own geometry, and the test asserts it — a building whose height cites no measure fails the gate.

Files with no licensed position are omitted, not parked at the origin. A file that never co-changed has no metric-derived place, and (0,0) reads as central, which is a claim nothing supports. Measured on the real repositories: 2 and 6 files respectively, reported rather than dropped.


The coercion that remains

BuildingKind is a closed union — hall, department, service, datacenter, library, security, conference, lot. DistrictKind is civic | product. A file is none of the first and a directory is neither of the second.

core/subject.ts documents having already learned exactly this:

"An earlier list named the furniture of one field, which meant whole industries could not map onto it and a connector would have been forced either to coerce a meaning or to invent one — both prohibited."

core fixed it with six abstract kinds. lib/world/types.ts did not, so the World type is domain-locked while the ontology beneath it is domain-independent.

The union was not widened — that would repeat the mistake with new names. Both coercions are declared in COERCIONS and rendered on the artifact, so a reader can see that kind carries no meaning in a generated world.

Two related fields stayed honest by being nullable: a directory reports revenue: null, not 0; a file reports capacity: null. The tests assert both, because reporting zero would be the missing-versus-zero defect.


What this does not change

The old estate is not removed. deriveStructure still exists and still drives the live page. This adds a second source for the same World type, so the renderer is unchanged and either can drive it. The estate remains the calibration environment that produced the renderer laws, the realization audit and the channel-interference measurements.


Standing

Measurable defect exposed? yes, previously — the estate was constant
Measurable improvement? yes — worlds now respond to input, asserted
Ontology expanded? no — the closed unions were coerced and declared, not widened

What is still not established

  • Nothing renders these worlds in 3-D yet. They satisfy the World type and the DOM suite still passes, but no page consumes worldFromFacts, so "watch the world construct itself" is not yet demonstrable in the product.
  • The representation audits have not been re-run on generated worlds — that is priority 2, and 113 buildings at 43 districts is a far denser estate than the 18 the label and occlusion measurements used. Density was the untestable variable; it is now testable, and the earlier verdicts may not survive it.
  • health is "unknown" for every generated building, correctly — nothing observed licenses ok. The renderer draws unknown as translucent, so a generated city will read as entirely uncertain until conditions are emitted.
  • Agents are placed at buildings[0] because commit authorship licenses no location. That is a placeholder, not a derivation, and it is the one thing in the generated world that is neither derived nor declared. It should be the next thing fixed.

223 → 229 tests, 26 DOM, tsc clean.