Hollow — overview
This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.
Hollow is the third game on the shared TypeScript ECS engine (@engine/*), alongside Farm
Valley, Citadel and MateQuest (the fourth, added after it). It is a generational social-emergence sim / research instrument: a town of
villager agents that have needs, gather from scarce resources, build trust, coalesce into emergent
communities, pair-bond, reproduce with heritable genomes, choose cooperative and antagonistic
social moves, and die — over many generations, deterministically, headless. The point is to
study what emerges (dynasties, cooperation-vs-sabotage divergence, community rise/fall) from
seeded initial conditions, not to hand-author a story.
Built via plan-split-dispatch (opus controller, Sonnet executors). On main since 2026-08-18 —
the old hollow working branch is history, and games/hollow/ is part of the default checkout.
M1–M5 are complete (01–15) plus hollow-13's LLM rationalizer seam; see the exit-bar results below.
The per-brief record is in log.md and the closed 2026-07-17-hollow-* specs in
todos/closed/.
Packages
@hollow/sim-core— the transport-agnostic, deterministic sim (systems, agents, world, economy, community, family, lineage, social protocols). Render-free.@hollow/client— browser client. M2 landed the living 3D town: it consumes the engine WebGL2 renderer, reads the Worker snapshot stream, and draws the cozy scene (src/render3d/+src/main.ts, workersrc/worker/).npm run hollow.@tool/hollow-sim— the headless research CLI (hollow-07): drivesbootstrapHollowSimon the main thread, samples metrics, captures the event chronicle, exports for offline study. Since M3 it consumes the shared@hollow/sim-core/observeserializers (one source of truth with the client) and acceptsPERSONA_SEED+INTERVENTION_LOGfor authored/replayed runs.
Layering obeys the monorepo rule: @engine/core → @hollow/sim-core → @hollow/client /
@tool/hollow-sim. The engine never imports a game; Hollow imports only @engine/*. hollow-02
promoted the generic agent kernel (needs, deliberation registry, relationship ledger, CNP
OfferLedger) up into @engine/core/agent so Farm and Hollow share one kernel.
The tick (scheduler order)
bootstrapHollowSim() registers systems in this deliberate order (each has an inline data-dep
rationale in sim-bootstrap.ts):
SHOCK → PERCEIVE (+social witness fan-out +feud) → DELIBERATE → ACT (+social verbs +care verbs collect/bury/treat) → TRUST-ACCRUAL → GOVERNANCE → JOBS → COMMUNITY → BELONGING → PAIRBOND → REPRODUCTION → DISEASE (hollow-15 daily mortality/recovery) → LIFECYCLE → CORPSE (hollow-15 rot + disease spread) → NEEDS-DECAY → RESOURCE-REGEN. (sim-bootstrap.ts is authoritative; DISEASE sits right before LIFECYCLE so a disease death flows through LIFECYCLE's single corpse-spawning death path, and CORPSE right after it.)
Determinism is load-bearing: all randomness flows through the seeded Rng via named fork(label)
(no Math.random/Date.now); a tick's output depends solely on the tick count. The social
deliberation layer is intentionally rng-free (pure genome/state scoring).
M1 systems (what emerges from what)
- hollow-03 needs / economy / scarcity — food/rest/wealth/safety/belonging needs decay; agents
travel to spatial resource nodes (finite stock + regen) to harvest+consume. A starvation signal
(
beliefs.data.starving) is the scarcity → population-regulation hook. - hollow-04 relationships / emergent communities — a directed trust
RelationshipLedgeraccrues from proximity/shared activity; a periodic detection pass crystallizes/grows/leaves/ splits/merges/dissolves communities;communityIdcouples to thebelongingneed. - hollow-05 lifecycle / pair-bonding / genetics — agents age (child→adult→elder), pair-bond into
households, reproduce with crossover+mutation genomes (behavior genes + aptitude + appearance),
and die (old age / starvation / a violence seam). A permanent
LineageRegistrykeeps ancestry queryable after ECS despawn. - hollow-06 social verbs — 9 verbs with real effects (gift/share/help_labor/teach/trade,
steal/sabotage/rumor/attack) + a lived
Skillslevel; villagers choose among them via a deterministic, genome-gated scorer (greed→steal, aggression→sabotage/attack, loyalty→gift/share, sociability→help, curiosity→teach). Survival always outranks social choice. - hollow-07 headless research CLI —
@tool/hollow-simexportsmetrics.csv(per-year time-series),events.jsonl(the chronicle),lineage.json(ancestry).npm run sim:hollow.
Load-bearing decisions
- Density-dependent birth brake (the population stabilizer). Food scarcity alone cannot bound
the population at test timescales: the per-partner food-security birth gate is bimodal (the AI
keeps everyone fed until food suddenly crashes) and pairbonding is a positive feedback, so the
raw system is bistable (explode or go extinct by seed — confirmed over 5 sweeps). The fix
(
BIRTH_PERCAPITA_FOOD_TARGET, family/constants.ts) scales effective birth chance by per-capita food supply → a smooth logistic brake → a self-limiting, seed-robust plateau. This is what makes "scarcity-stable population across seeds" real. - Compressed research profile. Production lifecycle constants are slow (adult window 8000 ticks)
— far too slow to show ≥5 generations headless.
@tool/hollow-simdefaults to a controller- validated compressed-but-stable profile (adultElder 200, gestation 10, birth brake target 6, food 120/tick) so a ~1200-tick run shows multi-generational, bounded, deterministic emergence. - Genome lives on a Hollow component, not the engine
Personality(which stays generic{kind}) — the engine never learns game specifics. admissionPolicyis binding, hinged on its default (2026-09-18, audit-49). It shipped in hollow-12a as a votable norm that nothing read — a third of the advertised governance mechanic was theatre, and since Hollow is a research instrument, aNORM_CHANGEDseries with no causal effect is worse than the feature being absent: it invites a causal reading of a number that causes nothing. Alternatives rejected: cutting the norm (two honest norms beat three where one is decorative — but it loses a designed-for axis that the vote machinery already supports), and labelling it "voted, not yet binding" (honest, but a norm nobody obeys confuses every future reader, and that option silently becomes permanent). How it is wired:admissionJoinThreshold(community/constants.ts) maps the norm to the combined-trust bar the GROW pass demands, piecewise-linear and hinged on the default — policy0.5returnsCOMMUNITY_JOIN_TRUST_THRESHOLDexactly, so a community that never voted its norm away from neutral behaves precisely as before. That is what confines the re-baselining to the mechanism under test. Two sub-calls worth knowing: the open end floors atCOMMUNITY_LEAVE_TRUST_THRESHOLD, because admitting below the leave bar would break the deliberate join/leave hysteresis and make members flap in and out forever — so the dial is asymmetric, and honestly so. And "fully closed" is a threshold just above the attainable maximum (1.01, since combined trust is an average of two[0,1]scores): exactly1.0was tried and rejected on evidence, because trust accrual saturates under sustained co-location and a "closed" community still admitted its oldest neighbours. Cost, measured: seed 7 over 3 compressed years is byte-identical; over 8 years the baseline moves (final population 34 → 31, communities formed 13 → 14). Governance drift alone keeps the norm near neutral (~0.48 after 28norm-changedevents), so the effect is small in natural play and shows up mainly where a community's membership genuinely votes it away from the default. Reproducibility re-verified: same seed twice → byte-identical across all four exports.Ownershipwas deleted, not kept as a seam (2026-09-18, audit-56). Every agent carried anOwnershipwhoseownerIdwas its own id and which no production code read — but it was a key in the reproduction query, so an agent spawned without it was silently sterile: no error, no log line, it simply never appeared in the query. The features it was a seam for (inheritance, and thetradeverb) both shipped oninventoryinstead, so the seam was never taken up. A seam kept "for later" that is simultaneously a silent gate is the worst of both. Guard:family/reproduction-query.test.tsnow fails if the query names any component the system does not actually read — closing the class, not just the instance. Removing the component was verified byte-identical across all four Hollow exports, which is what proves the premise ("nothing read it") was true.
M1 EXIT-BAR — PASSED (2026-07-20)
Judged by reading real exported runs (@tool/hollow-sim, compressed profile, 12 "years" =
1200 ticks), not test-green alone:
| criterion | seed 7 | seed 101 |
|---|---|---|
| population (stable band) | 24→57→37, bounded | 24→…→56, bounded |
| communities formed / dissolved | 10 / 6 (+3 merged) | 6 / 2 |
| lineage records (founders + descendants) | 206 (24+182) | 250 (24+226) |
| generations of descent | 16 | (deep) |
| cooperative events | 5273 | 1833 |
| antagonistic events | 1407 (~27%) | 140 (~7%) |
| violent deaths | 5 | 0 |
- Communities form AND dissolve/split/merge — yes (both seeds). ✓
- Cooperation-vs-sabotage differs meaningfully between seeds — yes: seed 7 is ~4× the antagonism share of seed 101 (~27% vs ~7%). ✓
- ≥3-generation lineages with heritable trait drift — yes: 16 generations of descent; mean behavior genes drift over the run (e.g. seed 7 mean sociability 0.53→0.62, a plausible selection signal). ✓
- Population held in a stable band by the scarcity + density brake — yes: bounded oscillation (24–57), no explosion, no extinction. ✓
- Deterministic —
CHECK_DETERMINISMpasses byte-identical on a small run. ✓ - Emergence narrative visible in the data — seed 7's metrics show a turbulent founding (high antagonism years 1–3: ~400 antag/window) settling into a cooperative equilibrium (antag →~0) as trust rises and communities consolidate. ✓
M2 — engine 3D renderer + cozy town (2026-07-20)
The first true-3D path in the repo. 08 @engine/core/render3d (promoted mesh generators — engine
ships no palette; mat4 still emits WebGPU-style clip z∈[0,1], remapped to GL's [-1,1] in the vertex shader, OrbitCamera, ray pick) + WebGPU
device/pipeline/instanced draw + scene3d.{vert,frag}.glsl (was scene3d.wgsl pre-migration). 09 the cozy town: ground/territory tints/
family-growing homes/stock-scaled nodes/day-night, gene-driven humanoids via the mesh-variant
scheme (skin×hair×pose), overlay glyphs/tags/click-inspect/follow-cam. Headline post-Chrome fix
(53bc26c): the material buffer used an 8-float stride but the WGSL var<storage> array is std430 =
4-float → half the palette rendered black. The live 3D image is human-Chrome-gated — no longer true as of 2026-08-18. That gate
existed because the sandbox has no WebGPU adapter (requestAdapter() → null). On WebGL2 the town
renders here fine (verified in-browser at 60fps via a software/ANGLE path), so 3D visual acceptance
is now checkable without a human.
Full slice-by-slice detail in log.md.
M3 — research surfaces + director role (2026-07-20)
Turns the viewer into a research instrument. 10 promoted the metrics/chronicle/export serializers
into a browser-safe @hollow/sim-core/observe (single source of truth; CLI tests unchanged =
byte-identity proof) + a live chronicle (click→camera-jump), dashboard, and in-app export. 11
(determinism-critical) @hollow/sim-core/persona (archetypes + per-gene lock + deterministic
applyPersonaSeed) + ONT_SHOCK famine/boom/disaster/plague via a SHOCK stage + a replayable
interventionLog (byte-identical replay), plus the authoring screen, time controls, shock buttons, and
a URL-hash run descriptor. Determinism lesson: Rng.fork() consumes a parent draw → new forks must
be appended after existing ones + created unconditionally. DOM/interaction flow verified headless; the
3D image is verifiable in-sandbox since the WebGL2 migration (2026-08-18).
Known limitations (carried forward)
steal/tradeare largely dormant in natural play (a fed town has no needy+greedy+low-trust actor next to a stealable holder). Mechanics are correct + unit-tested (hollow-06a); hollow-14's jobs→stockpile deepened the economy, but full emergence still wants scarcer per-agent inventory. See also M5's known traits (community-merge + chronic-hunger).attackis intentionally rare (aggression gate 0.99) to keep the population stable under random genomes; it does fire (0–39/seed) and feeds the violence-death seam.- hollow-12 feud arcs are a tail phenomenon. Because the antagonism gates are tuned for rarity and the scoring is needPressure-dominated, a mild greedy skew (0.85) fires ZERO antisocial acts in 300–400t — grudge escalation/reconciliation only manifests at an aggressive cohort + longer runs (700t). The economy-deepening brief that makes steal/trade emergent will also make feuds everyday.
betrayandexcludeverbs from the hollow-06 spec are deferred (documented seams).- Farm behavior-preservation for hollow-02 was gated on unit tests only (the byte-identity
EXPORT=jsondiff was skipped per user); residual risk lives in the encounter-tradeOfferLedgerswap, fallback = revert that file to its Map/Set form.
Where things live
- Sim: games/hollow/sim-core/src/ —
sim-bootstrap.ts,agents/(villager + social-verbs),community/,governance/(hollow-12a standing/leader/norms/ sanctions),family/(lifecycle/pairbond/reproduction + registry + genetics + constants),lineage/,social/(act + witness + feud + constants),mortality/(hollow-15 disease-system/corpse-system/care-act-system + constants + medic-capacity helper),protocols/(incl.governance.ts,feud.ts,mortality.ts). Corpse/Disease are Hollow components (components/corpse.ts,components/disease.ts);GRAVEYARD_TILEinworld/grid.ts. - Tool: tools/hollow-sim/src/ —
env.ts(research profile),metrics.ts,chronicle.ts,export.ts,run-core.ts,determinism.ts. - Observe / research (M3): games/hollow/sim-core/src/observe/
(
@hollow/sim-core/observe— metrics/chronicle/serializers/sampler, shared with the CLI),src/persona/(@hollow/sim-core/persona— PersonaSeed + presets + applyPersonaSeed),src/shock/+src/protocols/shock.ts(shock system + ONT_SHOCK), and client research surfaces undergames/hollow/client/src/(research-store.ts,chronicle-*,dashboard-panel.ts,export-panel.ts,persona-setup-panel.ts,time-control*,shock-*,run-descriptor.ts). - Engine 3D (M2): engine/core/src/render3d/ —
geometry.ts,mat4.ts,camera3d.ts,pick.ts,webgl2/(device3d/pipeline-cache/renderer3d/gl-buffers+shaders/scene3d.{vert,frag}.glsl). Generic; names no game. - Client 3D (M2): games/hollow/client/src/ —
render3d/(app.tsrender loop,humanoid.ts,agent-anim.ts,world-meshes.ts,overlay.ts,screen-project.ts,materials.ts,interp.ts, …),worker/(sim-worker.ts+inspect.ts),inspect-panel.ts,main.ts.
M4 — governance & antagonism arcs (hollow-12, done)
Depth on the emergent society, both slices sim-core + headless-verifiable (96f0bf5 + 1b32909).
12a governance — a GOVERNANCE stage gives each community per-member standing, a contestable
leader (argmax standing), votable norms (shareRate/cooperation/admission drift on a
standing+genome vote), and sanctions (fine / trust penalty / exclusion); norm-clash feeds the
existing LEAVE/SPLIT. All three norms are binding as of 2026-09-18 — admissionPolicy shipped
in 12a as a pure signal that nothing read, and audit-49 wired it into the GROW/join pass (see
Decisions). 12b antagonism arcs — a persistent directed Feud grudge (hostility was
stateless before) escalated by harm, reconciled by cooperation + decay, with a hysteresis band; it
biases antagonistic target-selection (spirals) but rarity gates stay on raw trust. Neither slice adds
an Rng/fork (pure arithmetic, id-sorted ties; nextU32 continuation proves the stream is
undisturbed); cross-seed + greedy-vs-loyal tests prove the dynamics emerge, not scripted.
M5 — Daily Life (hollow-14, done)
Re-textured the social sim into a legible daily life (design settled with the user; brief has the full
design-of-record). Five chunks, sim-core then a render pass (19fa2dc·48240fd·d404d3e·53f78fd·8382a8e):
- Day-cycle — a pure
dayPhase(tick, ticksPerDay)clock (commute/work/gather/sleep); in-game day 20→200 ticks. Life constants are RAW ticks, so a longer day preserves the generational saga WITHOUT retuning the bistable population constants. - Jobs —
occupationcomponent + a JOBS stage where the hollow-12 leader assigns roles by aptitude+demand (loners self-assign); gatherers produce into the community stockpile. - Hearth + routine — one authored central
HEARTH_TILE; agents commute to work, converge on the hearth at dusk, disperse home at night; belonging renews by hearth attendance, not membership. - Social throttle — interaction is now rare + private (per-agent cooldown + household/close-tie
gate); broad mixing only at the hearth during GATHER. Trust is proximity-driven, so a weak
TRUST_GATHERING_DELTAkeeps the nightly gathering from fusing the town into one community. - Render — glowing emissive hearth; the day/night wash is synced to the SIM day so dusk coincides
with the convergence;
Jtoggles job-cue badges. - Verified (controller's own headless run): interaction volume down ~6–66×, governance + feuds still fire, communities always emerge; population stable; 17/17 whole-workspace typecheck.
- Known traits (accepted, not bugs): (1) communities tend to MERGE into one cohesive village over time — inherent to one shared hearth; user accepted it as on-theme. (2) bounded, non-lethal chronic hunger on some seeds (the routine funnels foraging) — a food-economy balance item.
Governance & mortality are OBSERVABLE in the client (audit-63, 2026-09-18)
hollow-12 (governance/feuds) and hollow-15 (mortality/care) shipped as sim-core + chronicle only, so two of Hollow's six milestones were readable only by exporting CSV and opening it elsewhere — in a project whose stated purpose is a research instrument. Closed 2026-09-18:
- Dashboard gained a seventh chart, Feuds & disease (per window), plotting
feud_active_dyadsanddeaths_disease_window. The sampler already produced both; nothing plotted them. - Inspect panel now shows the community's leader (by name, or "this agent"), the inspected
agent's own standing, and all three votable norms —
admissionPolicyincluded, which is honest only because audit-49 made it binding first. - The snapshot stopped paying for data nobody read.
standing— a fullRecord<number, number>of every member's score — was structured-cloned across the worker boundary every tick with zero readers. It is removed: the inspect path reads the LIVE community (worker/inspect.ts) and needs one agent's score, not the whole map.leaderIdstays (one number, and now rendered). The live registry remains the source of truth; a per-tick renderer that wants standing back should add it with that renderer, not ahead of one. - No sim behaviour change: seed 7 over 8 compressed years is byte-identical across all four exports.
M6 — Mortality & Care (hollow-15, done 2026-07-21)
Gave death consequences and a care economy. Sim-core complete + headless-verified; render dispatched separately (visual; no longer Chrome-gated since 2026-08-18). Brief: ../todos/2026-07-21-hollow-15-mortality-and-care.md.
- Starvation is lethal in 3 in-game days. A starvation-death path already existed
(
family/lifecycle-system.ts) but defaulted to a huge 3000 raw ticks; the bootstrap default is now day-derived (STARVATION_DEATH_DAYS * ticksPerDay), still overridable viastarvationDeathTicks(the legacy scarcity + family tests pin a large value / disable disease to isolate what they test). - Corpses persist (architectural change). Death no longer silently despawns —
handleDeathspawns aCorpseon its own entity ({ id, corpse }, no agent/needs → invisible to every living-agent query) at the death tile, and releases any body the deceased was carrying. New DeathCause"disease". - Graveyard + grave-digger. One authored
GRAVEYARD_TILE(like the hearth, but offset +12,+12 so its disease radius never touches the hearth crowd). New leader/demand-assignedgrave-diggeroccupation: collect nearest unburied body → carry to graveyard → bury (corpse despawns,buriedCount++). - Rot → disease. An unburied body rots after
CORPSE_ROT_DELAY_DAYS(2) and infects uninfected agents withinDISEASE_SPREAD_RADIUS(2) atDISEASE_INFECT_PROB_PER_TICK(0.008/tick). Disease is a per-agentDiseasecomponent. - Disease outcome + medic. Each in-game day a sick agent rolls
DISEASE_MORTALITY_PROB_PER_DAY(0.10) to die (cause "disease"), REGARDLESS of treatment; a survivor recovers after 5 days on its own or 2 once a medic (new role, treats ≤3 patients/day, nearest sick-untreated first) has treated it. Compounded per-illness lethality is steep by design (untreated ≈41%, treated ≈19%) — which is why the INFECTION rate is kept low. - Two new stages around LIFECYCLE:
DISEASE(before — daily mortality/recovery, setsbeliefs.data.pendingDeathCausefor the one death path) andCORPSE(after — rot + spread + carried-corpse follow). Care verbs (collect/bury/treat) run in a newHollowCareActSystemsibling in the ACT stage. Two new unconditional rng forks appended aftershock(disease-spread,disease-mortality) — determinism preserved (byte-identical replay test passes). - Emergent balance (headless-verified, seeds 7/101, 2000t): grave-diggers emerge via a backlog-proportional demand nudge and bury the dead; disease becomes a controlled endemic (~7–10 disease deaths vs ~370 old-age), infections + treatments + recoveries all fire, population stays bounded (no collapse, no runaway). Key tuning: burial demand out-prioritizes medic demand (grave-digger bias 0.7 vs medic 0.6, corpse-demand target 4 so routine churn leaves work for medics) — because burial removes the disease SOURCE while treatment only mitigates. A far-corner graveyard + short rot delay was measured to turn every death into a town-wiping plague; the current placement + 2-day grace is what makes it survivable.
- Known trait (accepted): a poorly-organized town (leaderless/fragmented during an outbreak) can still suffer a heavier disease toll than a well-organized one — seed-dependent divergence, on-theme for the emergence sim, not a bug.
The LLM rationalizer seam — built, and how often it actually fires
hollow-13 shipped the seam (bounded choose-and-narrate within BDI candidates, event-triggered, async, off-by-default and byte-identical when off). hollow-16 then measured it, because the one property a reader will get wrong is the rate.
It is not steering the town, and it is not inert. With the contrarian diagnostic provider —
which disagrees with the substrate on every decision, so it bounds how often the seam can change
anything — across four seeds at 1500 ticks: 52 consultations, 6 adopted (11.5%), 43 rejected, all
stale-candidates. An answer lands ~42 ticks later (one SOCIAL_COOLDOWN_TICKS), and in 43 of
43 rejections the peer the model chose was no longer actionable.
When an answer does land, it matters. Seed 11 (4 adoptions) diverges from seam-OFF at 303 vs
284 births, 19 vs 21 generations, 719 vs 426 cooperative events, 33 vs 25 communities formed, with
lineage.json differing — different people are born. A handful of adopted choices cascade through a
generational sim. (Seed 7 is byte-identical to seam-OFF for the honest reason that it adopted
nothing; that once read as evidence the seam was dead.)
So: occasional influence, by design and in fact. Every headless run now prints its own
rationalizer — block (consultations, adopted + %, rejection reasons, median lag), so this figure
never has to be taken on a wiki page's word. Full reasoning, and the two "fixes" that are refused
because they would falsify the stated-vs-revealed record, are in
decisions.md → Hollow — the LLM-rationalizer seam.
The second site (hollow-17) and what it found
hollow-17 gave the seam a
second site: the community leader's own vote on shareRate at a governance pass. Its subject was
supposed to outlive the answer-lag, and measured, it does not: leaders survive only 40–60% of
passes, so the site adopts 16.5% under contrarian, against the social site's 11.5%. The churn is
a finding the owner kept as designed (decisions.md). The
economy-deepening idea is
largely absorbed by hollow-14 (jobs → stockpile); what remains is optional food-economy
balancing.