The upstream terrain pipeline assigns sparse IDs (range_1, range_50,
range_29...) and the prune pass drops entries but keeps original IDs.
This leaves 2394 bodies with non-sequential IDs across mountain_ranges,
rivers, and oceans.
Renumbered all feature IDs to sequential {prefix}_0, {prefix}_1, ...
preserving sort order. 24021 IDs fixed across 2394 bodies. No name
or geometry data changed — only the id field.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previous runs (both the GPU-contention kill and the anglophone-only
interrupt) left 19 hop 0-1 core bodies with stale generator output in
their markers.json files. Those bodies were being skipped via the
preserved path on relaunch, which meant the gttr-context fix
(commit a5fbce4c) would never touch them — exactly the set of
high-visibility systems that benefits most from per-system cohesion.
Reset to origin/main (clean null-name state) + re-prune to the 8/6
caps. Hand-authored templates (Edict, Estrade, Vuurkloof, Lendel,
Cairnside, Røros) explicitly excluded from the reset list and
verified intact (2-4 named cities each, untouched).
After this commit only the 6 hand-authored templates have
populated names in wiki/star-systems/. The entire rest of the reach
is clean and will be freshly named by the next gemma_naming.py run
with the full gttr + cosmopolitan + grounded few-shot + rotating
pool stack.
Bodies reset:
- Ran (GJ 144): all 9 bodies
- Sirius (GJ 244A): GJ244Ab, c, e-1, e-2 (not Ad, that's Edict)
- ACB (GJ 559B): GJ559Bb
- Tau Ceti (GJ 71): GJ71b, c, d, d-1, e
Two fixes from observing the first Gemma 2 batch run on Sirius:
1) Prune oversized feature counts. The upstream terrain pipeline emits
every distinct mountain cluster as a separate `mountain_range` and
every flowing path as a separate `river`. At the atlas generator's
512×256 grid this produced bodies with 40-80 named ranges and
10-15 rivers — noise, not information. A single planet with 48
ridges isn't richer, it's unparseable.
`tooling/planet-gen/prune_atlas_features.py` walks every
`markers.json` under `wiki/star-systems/`, ranks each feature type
by a size proxy, and keeps only the top N:
- mountain_ranges: sorted by `area_cells`, top 8 per body
- rivers: sorted by path length, top 6 per body
- oceans / cities / pois: untouched (already small, or
hand-authored by generate_atlas.py)
Sol (GJ-0) is hardcoded-excluded from pruning so the hand-authored
Earth / Mars / moon content stays untouched.
Each pruned body gets its atlas_* rows re-synced via
`sync_markers_to_db` so the DB mirror stays consistent. Bodies
whose wiki folder has no matching row in `bodies` (14 pre-existing
orphans like GJ1156h-1, GJ34Ah-2, …) are pruned in-file but skip
the DB sync to avoid FK violations on atlas_body_grids.
First run results:
bodies scanned: 2394
bodies pruned: 1513
mountain ranges dropped: 11640
rivers dropped: 1382
Safe to re-run — idempotent when a body is already within the caps.
2) Grounded cosmopolitan fallback palette. When Gemma's 3 retries
all fail (dedup, blocklist, stem-cap, placeholder), the code falls
to `_FALLBACK_STEMS[corridor]`. The old table had 10 stems per
corridor, all Latin-institutional (Meridian, Concord, Prefecture,
Cardinal, Lumen, Foro, Tabula, Vox, Axis, Senatus), which produced
the same-y `Axis Spine / Axis Ridge / Axis Heights / Axis Scarp`
clusters the user flagged on Sirius — exactly the old epic-Latin
register the few-shot pools were rewritten to avoid.
Fallbacks now draw from a 30-45 stem grounded cosmopolitan list
per corridor matching the few-shot pool intent:
- core: 45 stems (Ashfield, Bellview, Cedarbrook,
Fairmont, Ironwood, Kirkwood, Linden, Meridian,
Northfield, Riverside, Westbrook, …)
- north_reach: 40 stems (Ashford, Bellfield, Clifford, Drayton,
Elmhurst, Garner, Holmwood, Kelsworth, …)
- west_reach: 35 stems (Altdorf, Bergfjord, Eikhof, Hoogland,
Järvenpää, Kloosterdam, Nieuwpoort, Sørholm,
Svarteberg, Torsfell, Voorhout, Weserhof, Östby, …)
- east_reach: 35 stems (Aomori, Baektu, Chōshi, Fukagawa,
Hanyang, Izumi, Takamine, Yurigawa, …)
- south_reach: 36 stems (Alves, Brandão, Évora, Gomes, Ribeiro,
Serra, Várzea, Hlanganani, Kilimi, …)
- deep_frontier: 30 stems (Okafor, Stenner, Weller, Kellogg,
Stonebrook, Dustgate, Blackwater, …)
Per-feature suffix lists also expanded (e.g. river suffixes now
include Brook, Stream, Flow, Creek on top of the original Run /
Water / Beck / Rill / Course). Net effect: 300-450 unique fallback
combinations per (corridor, feature_type), up from 50, in the same
grounded register the few-shot pools teach.
Also preserves aliases `inner_corridor`, `inner_orbit`, and
`sol-gateway-axis` as legacy-compatible keys pointing at the
administrative-English palette.
Combined effect on the next run:
- ~45% fewer features to name (pruned 13k/52k)
- ~9× more fallback variety per corridor when fallback does trigger
- Same grounding overhaul from the previous commit, now reaching
into the safety-net path
Blocking PR #129 items 1, 2 (plus polish 16 and 17):
- D-191 §8 prose rewritten to match the code. The previous amendment said
positions were `{x, y}` objects against a "typically 1024 × 512" grid,
but the generator, the six hand-authored templates, and all 2394
procedural seed files ship `[row, col]` integer arrays against a
`{"w": 512, "h": 256}` grid. The decision doc is now aligned with
reality: positions are `[row, col]`, the storage grid is 512 × 256,
and the row-first ordering is called out explicitly so readers can
cross-reference NumPy/flood-fill/A*/cost-grid conventions.
- §8 now follows the D-094 amendment pattern. The superseded 2026-04-10
prose is preserved verbatim as "Original (superseded)" with a dated
Amendment block on top — future readers can see what changed and why
instead of silently losing the history.
- brands.toml header gains a short Phase 2 boundary note. The 4 anchor
brands come from D-189 §5; the additional ~23 brands from D-189 §11
are deliberately deferred to Phase 3 — Phase 2 only needs the demand-
node plumbing and V-B01..V-B06 validation exercised end-to-end.
- systems-schema.sql `bodies.terrain_reference` comment now pins the
repo-root-relative path convention (wiki/star-systems/<slug>/bodies/
<body_id>/heightmap.png) so the three downstream pipelines (populate,
atlas generator, client loader) share a documented contract instead
of drifting against an unwritten convention.
Implements the Phase 3 atlas content generator per D-191 §3, §8, and §9.
Pipeline per body (terrain-aware, deterministic per seed + body):
1. Simulate terrain via planet_simulation.simulate().
2. Analyse continents (flood-fill), habitability (temp/moisture/slope +
coastal bonus), river mouths, and a terrain A* cost grid.
3. Place cities sequentially — capital first (habitability + river-mouth
bias), then corridor growth via multi-source Dijkstra, quadrant-spread
penalty after 2 cities in a quadrant, port-on-new-continent bonus at
cities 3–4. ±25% noise for seed variation.
4. Generate roads and railroads as an MST over city positions, with
A* paths on the terrain cost grid (rail follows roads where possible).
5. Place a transit POI at the capital (15% chance to scatter to a
secondary city).
Output (canonical markers.json schema, pixel space per D-191 §8):
- cities: {id, name, kind, center:[r,c], population}
- roads: {id, name, kind, path:[[r,c],...]}
- railroads: {id, name, kind, path:[[r,c],...]}
- pois: {id, name, kind, center:[r,c]}
- existing rivers/oceans/mountain_ranges preserved untouched.
City names are left empty for gemma_naming.py (#833). Body population is
split across cities with geometric decay (capital ~50%, each subsequent
city half the previous). The 6 hand-authored bodies (Lendel, Edict,
Vuurkloof, Røros, Cairnside, Estrade) are detected by existing
`cities` and skipped for regeneration; their markers are still synced
to the DB index below.
Atlas index in systems.db (new):
- atlas_body_grids, atlas_cities, atlas_roads, atlas_railroads,
atlas_pois, atlas_rivers, atlas_oceans, atlas_mountain_ranges
- Scalar metadata mirror of every markers.json — the implant atlas app
and development queries can lookup cities/POIs/features without
scanning 267 JSON files. Polyline geometry stays in the markers.json
files next to the heightmaps (used by the renderer); the DB only
stores filterable scalar fields plus `point_count` as a length proxy.
- Schema lives in server/data/systems-schema.sql; generate_atlas.py
mirrors the CREATE TABLE IF NOT EXISTS block so it runs against any
DB state (matches the economy-db importer pattern).
- Populated and refreshed on every run. Each body's rows are deleted
and reinserted deterministically — no stale state.
Also fixes a pre-existing WIP bug in the quadrant-saturation penalty
loop (a stray outer `for r in range(GRID_H)` with unreachable breaks
meant only the NW quadrant was ever checked).
Runtime: 280s for all 267 inhabited bodies on a single core. 265 bodies
updated this run, 6 hand-authored bodies synced to DB without
regeneration.
Atlas index after run:
atlas_cities 329 (15 hand-authored + 314 awaiting #833)
atlas_roads 46
atlas_railroads 44
atlas_pois 287
atlas_rivers 2034
atlas_oceans 696
atlas_mountain_ranges 1953
atlas_body_grids 267
Adds the brand layer per D-189 §5:
- Schema: brand_products, brand_inputs, system_fiscal, corp_financial_state,
corp_lifecycle_events (+ 5 indexes).
- Importer: reads wiki/economics/corporations/brands.toml, populates the
new tables, validates V-B01–V-B05 structural rules, and derives
system_fiscal for inhabited systems.
- Data: 8 brand_products, 16 brand_inputs, 301 system_fiscal rows.
Brand products are demand nodes — they consume commodities; they are not
commodities themselves (D-185). Depends on copy PR #127 for the corp
records referenced by brands.toml.
Author Phase 3 atlas quality-bar templates for 4 core systems alongside
the pre-existing Lendel template. Names, cities, roads/rail, and POIs
hand-placed against each body's heightmap and tied to the system's
corridor naming tradition.
- GJ244Ad Edict (Sirius system, inner_corridor) — Assembly institutional
capital: Mandate 387M, Station Edict 13M, Founder's Range, Accord
Peaks, Founding Ocean, Edict Deep Line rail.
- GJ35c Vuurkloof (Van Maanen's Star, south_reach) — volcanic geothermal
settlement: Terras 290K, Kloofbas 50K, Groot Breuk, Ysterkop, Rantlyne
underground rail. Afrikaans geology naming per wiki canon.
- GJ66Bc Røros (Voss system, west_reach) — Compact mining world:
Storbjerg 3.2M, Hammervik 800K, Nordfjell, Rørosfjell, Storhav,
Glåmelva. Norwegian/Scandinavian heritage naming.
- GJ892d Cairnside (deep frontier, research domes) — Cairnside Primary
75M, Survey Post Kappa 5M, The Terraces, Baseline Lake, Baseline Rail.
Technical frontier naming pattern.
All files match the implemented Lendel markers.json format (grid + pixel
coordinates, raw population, gate terminal as named POI). D-191 section 8
describes the schema in abstract lat/lon terms; server team should align
generate_atlas.py and D-191 prose with the on-disk format before #832
and #833 consume these as few-shot examples.
These templates serve as the quality bar for generator tuning and as
few-shot examples for the Gemma 2 naming pipeline (#833).
Ticket: #837
Decisions: D-191 (Phase 3 atlas), D-036 (Sova/Vuurkloof canon), D-144
(Sirius/Concord seat)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GJ 624 is Halvøy (aquaculture world), not Freiholt. Freiholt is GJ 453.
Fixed both cross-reference occurrences in compact-of-westphalia.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All 36 commodity stubs fleshed out with lore context, production chain
descriptions, and economic intelligence briefing voice. Key treatments:
fusion_fuel (D-187 8:1 ratio), services (location-bound mechanics),
brands distinguished from commodities per D-185.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per-system-type intensity bands (core 0.0-0.2 through frontier 0.6-0.9),
6 seeding modifiers, 10 named system overrides. Compact framing as
principled economic resistance per D-174. Feeds server #808.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 MARK_PRIMARY systems (Compact members, west_reach hops 7-17),
14 MIXED systems (Compact-sympathetic, hops 5-6), with rationale
comments per D-172 political affiliation rules. Feeds server #805.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The flag is a susceptibility marker, not an absolute state — Commission
certification only applies when trading in TRACTUS_PRIMARY zones.
Compact-internal trade ignores it entirely. Renamed across all TOML
source files, schema docs, workshop outputs, and D-184.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full regeneration of ~2,600 bodies with:
- Correct atmosphere rim colors for extended planet classes
- Clean headings and profile tables (no underscores)
- Boreal/tropical cloud coverage at correct ranges
- Gas giants without meaningless terrain fields
- All heightmaps at 1024x512
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Scaffolded index.md, globe.png (512x512), heightmap.png (1024x512),
terrain.npz, and markers.json for ~2600 celestial bodies across the
Settled Reach. Heightmaps render at native simulation resolution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
"Biome" describes per-zone vegetation classification (Whittaker table).
"Planet class" describes overall planetary character. The conflation
caused the planet generator to misclassify ~270 bodies as barren.
Scope: systems.db column, schema SQL, Rust atlas code, wiki table
headers (Biome → Class), atlas proposal JSONs, all docs/decisions,
tooling scripts. Also normalizes atmosphere vocabulary (breathable →
standard) and expands planet class mapping to all 26 wiki values.
Unknown classes default to temperate for modder safety.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GJ-280B is a stub pending full generation — economic profile fields
were speculative and should not be present until the system is properly
authored.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix 16 lore_archetype keys in tier1.toml to match lore.toml definitions
- Fix 4 commodity ID mismatches (medical_re-embodiment, fine_dining, vehicles, entertainment)
- Add pharmaceutical_manufacturer archetype to lore.toml
- Fix station_module_constructor note (Cygni B → Sova Station Works)
- Create GJ-280B stub (Sova Station Works HQ system)
- Add Station Sova cross-reference to sova-station-works.md
- Fix GJ-251 and GJ-144 economic exports (financial_services contradictions)
- Split corporation index into Narrative Profiles and Tier 1 sections
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove tracked kallast_terrain.npy (HIGH — binary in git)
- Amend D-086: stance + interaction icons delivered, not deferred
- Create ticket #818 for icon_tint.gdshader (client team)
- Fix gas giant profile table: suppress gravity/land%/hydrosphere
- Fix atmosphere_color: null when atmosphere is none
- Fix gas_giant_ringed display as gas_giant in profile table
- Re-scaffold + regenerate Ran system with fixes
.import sidecars: not applicable — gitignored by design (client/**/*.import).
Godot auto-generates on first run.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds 25 new named corporations covering D-175 priority gaps: financial
services (Groombridge Settlement House, Compact Financial Exchange,
Meridian Risk), re-embodiment (Somatic Futures, Blue Collective), east
reach anchors, Compact distributors, freight, mining, medical, lattice,
and more. Each corp has lore + behavioral archetype, political tension,
administered silence, currency preference, and branded products.
Includes TOML records in wiki/economics/corporations/tier1.toml and
narrative wiki pages in wiki/corporations/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds wiki/economics/archetypes/ with 28 lore archetypes (WHAT/WHERE)
and 6 behavioral archetypes (HOW) as TOML templates. These are the
generation templates for Tier-2 and Tier-3 corporations per D-175.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds Bodies and Population rows to System Profile tables across all 301
star-system wiki pages. Adds Industries, Exports, and Imports economic
profile rows derived from systems.db economic_base + body type + topology.
Includes 9 body/station name changes from cultural diversity remediation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 changes across 18 systems implementing the approved remediation plan
from the cultural diversity audit (docs/design/cultural-diversity-audit.md).
DB changes (15 bodies/stations in systems.db):
- Thai bodies: Saikaew (GJ 635B), Nakhon Sung (GJ 667C), Doi Kaeo (GJ 117)
- Khmer bodies: Banteay (GJ 434), Srok Thmei (GJ 866A)
- Ukrainian: Chornozem body + Svoboda station (GJ 729)
- Caribbean: Lavenille body (GJ 873), Accompong Works station (GJ 406)
- Malay: Pulau Baru body (GJ 555), Balai station (GJ 449)
- Scientists: Huygens Platform (GJ 251), Ramanujan Station (GJ 699),
van Leeuwenhoek Station (GJ 820B), Turing Survey (GJ 663A)
Wiki calibration note additions:
- GJ 635B/667C/117/434: Thai cultural presence (survey teams, founding cohorts)
- GJ 866A/873: Khmer/Caribbean community naming origin
- GJ 729: Ukrainian founding cooperative in west_reach
- GJ 1245A/75: Igbo/Nigerian heritage explicitly acknowledged
- GJ 172: Malay kelong dual-heritage in Kaelong name
- GJ 601A: Russian secondary founding stream in Ostmark
Horizon stations not renamed. No corridor reassignments.
Conservative: systems with existing identity untouched.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
First system through the planet generator pipeline. Per-body wiki
pages with YAML frontmatter at wiki/star-systems/GJ-144/bodies/.
Each body has: index.md (definition + profile), heightmap.png
(4096×2048), globe.png (512×512), and markers.json (rivers, oceans,
mountain ranges).
Bodies: GJ144b-g + moons. Includes temperate (Kallast, Vethis),
frozen, barren moons, and a ringed gas giant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Workshop #801 deliverable: commodities.toml (36 commodities across
5 tiers), production_chains.toml (21 Leontief recipes including
2 substitution routes), schema.md (SQL DDL + validation rules).
Key design choices: brands are not commodities (separate layer),
water→fuel at 8:1 yield, 3 political sub-flags replacing single
boolean, gate energy-over-gate as commercial service. Wiki stub
pages generated for all 36 commodities.
Tickets #811–#815 created for follow-up work. #801 closed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hub systems at hops 0-4 with pop >10K now have individual GTTR entries.
Covers Gateway, Sirius, ACB, Cygni B, Bastion, Nova Roma, Fremantle,
Kampala Gate, Aurelius, Puerto Rivera, and Okafor Station. Each follows
the established drifter's-voice format with Adams rating and practical
information sections.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nova Estrada: added founding agreement time-bomb, thirty-year cost, and
infrastructure audition sections. Entremeio: added transit policy, lake
settlement, and Assembly defiance sections. Both now match Kettenschmied
quality bar.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Subversions added or made explicit across 3 most-imbalanced groups:
Afrikaans/Dutch:
- Breëvlei (GJ-661B): xenobiology research community, pre-settlement
marsh stakes of unknown origin drive community identity
- Bestevaer (GJ-103): Dutch maritime mystery culture; Diepzeecommissie
secretly building capacity to investigate restricted deep zone
German:
- Lichtung (GJ-356A): full rewrite → artists' colony, F-type light
environment, no industrial or agricultural purpose
- Haltefenn (GJ-1248): Moorlesen craft tradition (peat-layer reading as
art) now primary economic identity over peat fuel extraction
Portuguese:
- Espinho (GJ-1075): science/research subversion made explicit on page
- Nascente (GJ-2097): Irmandade reframed as commercial dynasty via 400
years of freight transit intelligence
Also creates docs/audits/cultural-stereotyping-audit.md with full audit
findings, ratios, recommendations, and follow-up scope for Sprint 32+.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. GJ 111: spectral_class F5V → F5/F6V to match wiki (subgiant)
2. GJ 3943: spectral_class k-m → K5V+M3V (valid MK notation for binary)
3. GJ 903: write wiki prose — was empty stub with only body tables
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
commit-system was inserting bodies/stations but never writing proper_name
to star_systems. Bulk-updated all 276 authored system names. Fixed duplicate
body_id collisions in GJ 1156, GJ 139, GJ 34A, GJ 34B, GJ 661A, GJ 664,
GJ 780 (planet and gas giant sharing same letter suffix).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>