Skip to content

Latest commit

 

History

History
1416 lines (1157 loc) · 97.2 KB

status.md

File metadata and controls

1416 lines (1157 loc) · 97.2 KB

Project Status

Last Updated: 2026-09-28 (Construction G3: foundation Add / Subtract. An editable blueprint is reshaped in place, an Add onto a built foundation becomes an extension blueprint that merges into it once built, and the result is judged against every foundation rule, including the new foundation-to-foundation pathing clearance. See dev log 2026-09-28-foundation-add-subtract.md. Earlier: 2026-09-27 WOR-493/WOR-488 fixed: the navmesh is one constrained Delaunay triangulation of the arrangement, so no face drops (chunk-corner water pinches and 300-tree land faces no longer blank the landing), a route deferred for want of a mesh is requested again when the nav generation moves, and the "Waiting for the area to settle" hold gives way to the first wander. See dev log 2026-09-27-frozen-colonist-unplaceable-stations.md. Earlier: 2026-09-26 Organic Terrain Geometry epic complete: water is the terrain rings for nav, rendering, vision, and mud, and every land boundary is a warped field isoline. See dev log 2026-09-26-organic-terrain-geometry.md. Earlier: WOR-463: perf validated across zoom levels; the ground and water pass stays under 1.5 ms of GPU at 3072x1728 at every zoom (now reported as tileGpuMs), far-zoom land LOD, 0.25 m near distance-field texels, the waterline lattice's one-sided cells filled in spans, nav regions recenter without blocking the frame. Earlier: WOR-462: every land-on-land boundary drawn as the isoline of a warped per-surface field (SurfaceField + land.glsl, golden-tested against each other), render tiles shrunk to 524 KB a chunk with a 3-tile apron post-processed like the neighbors' tiles, placement reading the painted field and the water rings, tile.glsl neighbor bleed and tile adjacency deleted. Earlier: WOR-461: vision drinks from shore points sampled along the rings, mud banks by distance to the rings that continue across chunk borders, point-bar sand on tight inner bends, TerrainPolygonQuery over each chunk's rings. Earlier: WOR-460: water and shore painted per pixel from the distance field, tile water path deleted, shader look tunable live over /api/dev/tunable. Earlier: WOR-459: nav reads the chunks' terrain rings, tile marcher deleted; colonists stop at the smooth waterline and wade fordable creeks. Earlier: WOR-457 per-chunk waterline rings built on the chunk worker, contour module in libs/geometry. Earlier: Game UI to Prototype Polish complete: 8 PRs merged (#256-#261, #263, #264) — layout verification harness (/api/ui/tree + /api/ui/lint), LayoutContainer auto-layout engine (Fill/Hug/Fixed, distribution, gap/padding, auto text wrap), MSDF text fixes, ScenarioSelect + PartySelect scenes with party→spawn wiring, starfield/planet backdrops, EntityInfoView rebuild, region minimap panel, dossier Gear paperdoll, full pre-game screen fidelity; lint reports zero violations on every screen. See dev log 2026-07-03-game-ui-prototype-polish.md. Earlier: Colonist task arbitration complete: (tier,score) key, 7-tier ladder, job lifecycle, TaskListView inspector, 879 engine-tests green, combined four-scenario flow verified end-to-end. Earlier: Colonist gameplay stabilization complete and merged (#241): grass is now a first-class GPU-instanced groundcover role driven by a procedural Lua asset (24 variants, ~486k tufts @ 120fps/1.75ms), placed entities no longer randomly tilt (opt-in ), and the EntityRenderer god-class was decomposed into per-path renderers. Story 0 of Living Environment Rendering; M-A wind next. See dev log 2026-06-27-groundcover-render-path.md. Earlier: Worldgen M7 complete: input-validation envelope + fail-loud reason channel, golden full-pipeline worldHash gate that turns dual-platform CI into a cross-platform determinism check (+ worldgen-cli --expect-hash), and a benchmark-calibrated default resolution (gen-time sweep on the reference machine; kept n=1024 as a documented kDefaultGridSubdivision). Closes the last engineering task of the World Generation & Creator epic; only the deferred planet-DB streaming and landing-difficulty UX remain. See dev log 2026-06-26-worldgen-m7-hardening.md. Earlier: Physical carry & stacks epics complete and merged (#218/#219/#224/#228/#230/#232/#233): two-hand wood armfuls + strength-derived carry, then a universal physical "stack" model -- one material capped at its own stackSize everywhere -- plus construction sites that hold their required materials directly and dump to the ground on demolish. See dev log 2026-06-26-physical-stack-inventory.md and plan 2026-06-26-bulk-material-carry-felling.md. Earlier: 2D landscape from 3D hydrology epic complete and merged (#212) -- replaced the noise-flood ponds with sparse biome/precip-weighted ponds + desert oases, implemented Distribution::Spaced with grove/glade/thicket clustering for denser natural forests, and fixed riparian plants (reeds on the mud bank + bankside bushes); follows the merged 2D rivers #208 and tributaries/springs #210. See dev log 2026-06-22-hydrology-ponds-and-proper-forests.md. Earlier: Realistic chained build loop: mass-based carry weight + axe-gated chopping + wood-unit tree harvesting; the colonist chops to its carry cap, hauls, repeats, then builds. Plus the task-chaining UI/AI fixes found verifying it (in-progress-work priority calc, friendly labels, full-width info-panel task lines, "Next" chain step, build-progress percent + on-map fill, global task list Build umbrella + who's-working-it). See dev log 2026-06-20-carry-weight-axe-gated-harvest.md. Earlier on main: Asset Manager epic #205 (dev log 2026-06-20-asset-manager.md), Cryosphere #199, Navigation P4 belief filtering #189/#191/#194, Vision System #172-184, Salvage UI cutover #176-181)

Epic/Story/Task Template

Use this template for all work items:

## Epic Title
**Spec/Documentation:** /path/to/spec.md or /path/to/folder/
**Dependencies:** Epic Name (if applicable)
**Status:** ready | in progress | blocked | needs spec

**Tasks:**
- [ ] Story Title
  - [ ] Task Title
    - [ ] Sub-task Title

Notes:

  • Max 3 levels of nesting (Story → Task → Sub-task)
  • Only last 4 completed epics + in-progress + planned epics shown here
  • Completed epics get a development log entry in /docs/development-log/entries/
  • An epic is only complete when ALL tasks are [x]

Recently Completed Epics (Last 4)

✅ Organic Terrain Geometry (terrain polygons)

Spec/Documentation: /docs/technical/organic-terrain/terrain-polygons-architecture.md, dev log 2026-09-26-organic-terrain-geometry.md Dependencies: none Status: complete (Specboard WOR-455; merged #268, #269, #274, #275, #276, #277, #278, #281, #282, and the WOR-463 PR)

Tasks:

  • Spec (PR #269, merged)
  • Waterline contour extractor: libs/geometry/contour/, sampler apron, TerrainPolygonBuilder waterline rings on Chunk (WOR-457)
  • Channel and pond rings, fordable split, mouth flare (WOR-458)
  • TerrainDistanceField bake, CPU side (WOR-465; GPU upload moves to the shader task)
  • Nav reads rings, tile marcher deleted (WOR-459)
  • Shader: tile.frag against the distance field, GPU upload, tile water path deleted, live tunables (WOR-460)
  • Vision shore points, distance-based mud, point bars, TerrainPolygonQuery (WOR-461)
  • Every land-on-land boundary drawn as a warped field isoline (WOR-462, spec D16)
    • Field in C++ (SurfaceField) and GLSL (land.glsl), golden test, render tiles with a 3-tile apron, beds by world position, neighbor bleed deleted
    • Apron tiles post-processed like the neighbor's (WOR-461 entry point), placement reads the field, tile adjacency deleted
  • Perf validation across zoom levels (WOR-463)

✅ Game UI to Prototype Polish

Spec/Documentation: docs/design/ui/fidelity-gaps.md, docs/design/ui/ui-improvements-phase-2.md, dev log 2026-07-03-game-ui-prototype-polish.md Dependencies: Salvage UI Cutover Status: complete (merged #256, #257, #258, #259, #260, #261, #263, #264)

Tasks:

  • Layout verification harness: /api/ui/tree + /api/ui/lint, UiTreeSerializer + LayoutLint, characterization tests (#259)
  • LayoutContainer auto-layout engine: Fill/Hug/Fixed + fillWeight, Distribution, CrossAlign, gap/padding, three-pass layout, auto text wrap width, per-axis definite sizes (#263)
  • Text rendering fixes: baseline run-origin pixel snapping, unified measurement, atlas validation, per-run snap cache (#258)
  • ScenarioSelect + PartySelect scenes, scenario-driven party size, party→spawn wiring (#257)
  • ResourcesPanel wired to colony storage via ResourcesAdapter/Model (#256)
  • Starfield nebula/vignette + DecorativePlanet backdrops; planet-view alpha compositing (#261)
  • ccache cross-worktree poisoning root-caused and fixed (depend_mode + namespace, #260)
  • EntityInfoView rebuilt on the engine: Avatar header, tabs, real Draft/Go-to; all selection paths preserved (#264)
  • Region minimap panel + HUD batch: vertical zoom, TopBar bell/mark, Zones stub; LayerHandle z-sort fix (#264)
  • Dossier Gear paperdoll, Health→Needs rename, tab order, overflow pass (#264)
  • Pre-game screen fidelity: all 7 screens + pre-game harness drain (#264)
  • Close-out: docs, dev log, full-flow verification (lint zero on every screen; New Game walked end-to-end; Quick Start intact)

Result: The game UI matches the prototype's structure and polish on every screen, verified by machine-checked layout linting. Follow-ups recorded in the dev log: ASCII-only font atlas, font-family threading for wrapped text, window-size flag for multi-resolution lint, Hug-freeze engine wart. ✅

✅ Colonist task arbitration

Spec/Documentation: docs/technical/colonist-task-arbitration.md Dependencies: Colonist gameplay stabilization (complete), Goal-Driven Task Generation (in progress) Status: complete (3 commits on this branch)

Goal: Replace the drifted additive-float priority with a lexicographic (tier, score) key; add a job-lifecycle model so a colonist commits to an active work order across distractions.

Tasks:

  • Implement the (tier, score) lexicographic arbitrator in AIDecisionSystem
  • 7-tier ladder classification for all action types (tiers in assets/config/work/priority-tuning.xml <TaskTiers>, fail-loud startup validation)
  • Within-tier score: distanceFactor (300*max(0,1-d/60), dominant), skillBonus, taskAgeBonus, hysteresis margin (50)
  • Job lifecycle: harvest locate-by-entity-id (kills phantom loop); StorageGoalSystem retires stale stocking-harvests; floor constants deleted
  • TaskListView inspector: tier/score/breakdown/selectionSummary, live update, T hotkey
  • Acceptance: combined four-scenario flow end-to-end, zero phantom harvest-loops, zero queued-job stalls, 879 engine-tests green
  • Docs updated (this file, ai-behavior.md, priority-config.md, colonist-task-arbitration.md, dev log entry)

Result: Lexicographic arbitration restored; phantom harvest-loop and queued-job stall fixed. Follow-ups: packaged-furniture lifecycle + findValidPositionNear; stocking re-arm / discovery-gating. ✅

✅ Colonist gameplay stabilization (craft → harvest → construction loop)

Spec/Documentation: dev log 2026-06-29-colonist-gameplay-stabilization.md; arbitration spec docs/technical/colonist-task-arbitration.md; testing suite docs/testing/ Dependencies: Navmesh/craft reliability (#240), Building & Construction Status: complete (merged PR #241)

Goal: Drive four end-to-end gameplay scenarios to reliable completion: craft axe, craft + stock storage box, fill a box to ~200 wood by real chop + haul, build a wood foundation with wall clearing + provisioning + construction.

Tasks:

  • Harvest/build target snap to reachable adjacent point + off-area reject (keystone)
  • Destructive fell reclaims navmesh hole (PlacementExecutor removalEpoch → region rebuild)
  • Belt stow-to-free-hands on armful pickup (axe → belt before two-hand wood armful)
  • Loose-pile haul: carry-state-first phase, deposit-redirect on carrying-at-source
  • Wall-collision-aware off-mesh recovery snap
  • Whole-footprint on-water placement refusal (NavigationSystem::isAreaWalkable; DrawingSystem + dev verbs)
  • Gather-food priority lowered + construction provisioning/build-action priority floors (interim)
  • StorageRule.minAmount shortfall → harvest goals (chop-and-stock loop)
  • Forest-by-river quickstart landing + denser forest + fail-fast on missing prebuilt planet
  • Construction readback: walls, delivered/required/progress, phase
  • Dev tooling: /api/dev/storage, /api/state?what=storage|landing, hands/belt in colonist state
  • docs/testing/ scenario suite (4 scenarios, regression log)
  • Arbitration spec (docs/technical/colonist-task-arbitration.md) + Specboard epic filed

Result: All four gameplay scenarios complete end-to-end. 872 engine tests green. Open follow-ups: crafted-box placement/packaged-furniture lifecycle, items-in-river/findValidPositionNear, mirrored colonist sprites, dev-tools spawn UX, arbitration implementation. ✅

✅ Physical carry & stacks (two-hand armfuls, universal stacks, construction-direct materials)

Spec/Documentation: dev log 2026-06-26-physical-stack-inventory.md, plan 2026-06-26-bulk-material-carry-felling.md; specs /docs/technical/bulk-materials-carry-and-felling.md, /docs/technical/physical-stack-inventory.md Dependencies: Realistic chained build loop (carry weight + axe-gated harvest) Status: complete (merged #218, #219, #224, #228, #230, #232, #233)

Goal: Make wood a two-hand bulky item carried as a strength-limited armful (felling is one destructive action that drops a loose pile), then make a "stack" a universal physical unit -- one material, quantity in [1, stackSize] -- everywhere from hands to boxes to build sites, with carry bound by weight or count, whichever comes first.

Tasks:

  • Bulk carry & felling (epic de719237, #218 + follow-ups #219): two-hand wood armful, Strength -> carry capacity, one-shot destructive felling, loose ground stacks, hand-aware haul/craft/deposit, HUD carry surfaces
  • Physical stacks (epic 0db82dab, #224/#228/#230/#232/#233): slot-based multi-stack Inventory, per-material stackSize (Wood 40, Berry 200, Stick 100), ground-pile split + scatter, construction sites hold materials directly (no Inventory; demolish drops salvage at tear-down completion), storage hauls sized by item capacity, armful clamped to stackSize

Result: A stack is one material in [1, stackSize] everywhere -- hands, pack, shelf, box, build site, ground; carry binds on weight or count, whichever comes first; build sites hold their manifest directly and dump to the ground on demolish. Deferred: per-stack container UI (88dc9e90), DrawingSystem rename (7d785fc6). ✅

✅ 2D Landscape from 3D Hydrology (rivers, ponds, forests)

Spec/Documentation: dev logs 2026-06-21-2d-rivers-and-water-landing.md, 2026-06-21-river-tributaries-springs.md, 2026-06-22-hydrology-ponds-and-proper-forests.md Dependencies: Water Availability (3D drainage), World Generation & Creator Status: complete (merged #208, #210, #212)

Goal: Render the 3D planet's hydrology into the 2D landing world at the right scale and make the surrounding landscape read as real -- followable rivers, sparse hydrology-driven ponds with desert oases, and dense naturally-clustered forests with working waterside plants.

Tasks:

  • 2D rivers from 3D drainage (RiverNetwork2D: meandered flow-sized polylines, seam-safe) + water-biased landing (#208)
  • River tributaries, springs, and trickle headwaters (#210)
  • Hydrology ponds: remove noise-flood ponds; sparse biome/precip-weighted PondNetwork2D; desert oasis via distance-to-water (#212)
  • Proper forests: implement Distribution::Spaced; grove/glade/thicket density field; denser forest trees (#212)
  • Riparian plants: reeds on the mud bank (near="Mud", mud now forms on sand too); bankside berry/woody bushes in forest biomes (#212)

Result: The 2D world now grows rivers, sparse ponds, desert oases, clustered forests, and waterside plants from the 3D hydrology/biome data. Self-review on #212 fixed 4/5 findings; the 5th (cross-chunk Spaced spacing) is filed as Worldsim bug e0c87da0. Follow-ups: pond inlet/outlet streams, water-loving riparian trees. ✅

✅ Dev/Test Tools (HTTP verbs + developer-client tab)

Spec/Documentation: /docs/development-log/entries/2026-06-16-dev-tools-api-and-tab.md, /docs/development-log/plans/2026-06-16-dev-tools-api-and-tab.md Dependencies: None Status: complete (merged PR #157)

Completed Tasks:

  • Step 1: spawn, colonist, give (replaces givewood; site/loose/colonist/storage)
  • Step 2: need, time (speed/set/skip), teleport, select, kill, complete
  • Step 3: synchronous /api/state?what=summary|colonists|construction|time (screenshot-style request/response handshake)
  • Phase 2: Dev Tools tab (DevToolsService + DevToolsPanel) in the static developer-client
  • Refactor: dev surface extracted from GameScene into DevCommandHandler (scenes/game/dev/)
  • parseDevVerb tests refreshed (7/7); two rounds of Copilot review cleared (single-flight /api/state, CV wait, jsonEscape)

Result: Dev-only /api/dev/<verb> controls plus a synchronous /api/state readback, driven from a Dev Tools tab in the static developer-client, so sim state can be set up and asserted on without screenshots. In-browser tab click-test was skipped by choice (build clean, every endpoint curl-verified); demolish, inventory-in-readback, and query/count deferred as optional. ✅

✅ UI Design System (Salvage) — extraction

Spec/Documentation: /docs/design/ui/ Dependencies: None Status: complete (docs extracted from prototype; C++ implementation is a separate future epic)

Goal: Extract the approved "Salvage" UI prototype (docs/ui-prototype/) into durable design docs so the C++ build follows the docs, not the throwaway CSS. The prototype is kept as the live look-and-feel sandbox.

Completed Tasks:

  • Design language doc (principles, palette, typography, texture, motion)
  • Tokens: deterministic tokens.json (+ rgba floats, palette.svg) and readable tokens.md, generated from tokens.css
  • Component catalog: all 14 primitives (variants, props, states, anatomy, behavior/formulas)
  • Icons: 51-glyph set extracted to icons.json + icons-preview.svg + icons.md
  • Screen specs: 7 screens (pre-game flow + in-game HUD with every sub-state)
  • Mocks: rendered shots of every screen and in-game state (Playwright capture script) + anatomy wireframes for the dense screens
  • Re-runnable extraction scripts in the prototype; wired into /docs/design/INDEX.md

Result: /docs/design/ui/ holds the canonical UI spec. The data that only lived in code (icon paths, token values, component formulas, font identities) is now in text. Next: C++ implementation (generate constexpr Theme.h from tokens.json, build the primitive library, stroke-tessellated icons, multi-font). ✅

✅ Water Availability (worldgen + landing UX)

Spec/Documentation: /docs/development-log/entries/2026-06-15-worldgen-water-and-plate-realism.md, .claude/plans/water-hydrology.md Dependencies: Climate/Biome/Shelf Retune Status: complete (PRs #144, #146 merged)

Goal: Fix the coarse drainage so flow reaches the sea or ponds into basins, set the dead kFlagRiver/kFlagLake flags, and tell the player whether a landing site has fresh water (details pane + globe Hydrology mode). Worldgen stays coarse (amount + direction); actual river/lake geometry is deferred to chunk load.

Completed Tasks:

  • W-0: water stats baseline (WorldStats + worldgen-cli)
  • W-1: priority-flood depression routing + coarse kFlagRiver/kFlagLake + basin spill levels (resolution-invariant river quantile)
  • W-2: globe Hydrology color mode
  • W-3: landing-site water signal + details pane (river/lake on tile-or-neighbor, coast, rain-fed) + freshwater-biased default site
  • W-4: docs + PR; two Copilot rounds cleared; sub-1m lake spill-depth truncation fix (#146)

Result: Every land tile routes to the sea or a marked endorheic basin; lakes form in real basins; rivers ~4-5% of land, stable across resolution; landing pane reports water/terrain/climate/difficulty. Deterministic across thread counts. Follow-ups: valley erosion, 2D chunk-time river/lake rendering. ✅

✅ Plate Boundary Realism (straight-mountains fix)

Spec/Documentation: /docs/development-log/entries/2026-06-15-worldgen-water-and-plate-realism.md Dependencies: Tectonic History Simulation Status: complete (PR #145 merged)

Goal: Kill the dead-straight mountain walls that appeared across many generated worlds.

Completed Tasks:

  • Multi-agent diagnosis: root cause is the great-circle rift cut (tryRift plane-split), amplified by a flat plate-size distribution and a uniform belt-lift pedestal
  • Curved rift cut: two-front noisy Dijkstra split replacing the great-circle plane (oversized + suture paths)
  • Power-law plate-size hierarchy at seeding (few large, many small)
  • Along-belt lift modulation so ranges get passes/saddles instead of a uniform wall
  • Ultra 2048 generator option; golden hash re-pin; six-seed biome acceptance test; Copilot cleared

Result: Rift seams meander like real margins, no straight great-circle cuts on any seed (including low plate counts); the plate inventory has an Earth-like size hierarchy; mountain crests break into passes. Deterministic across thread counts. ✅

✅ Climate, Biome & Shelf Realism Retune (worldgen)

Spec/Documentation: /docs/development-log/entries/2026-06-14-climate-biome-shelf-retune.md Dependencies: Tectonic History Simulation Status: complete (PR #139 merged)

Goal: Retune the climate/biome stages (written against the old smooth terrain) for the new linear belts + bimodal hypsometry.

Completed Tasks:

  • C-1..C-5: meridional wind + distance-to-ocean moisture-advection sweep (rain shadows that scale to wide belts) + continentality temperature; piecewise continental shelf; biome rebalance + montane decouple + biome-fraction acceptance stats; dead-flag hygiene (kFlagCoast/kFlagGlacier); docs + dev log
  • Self-review (2 agents) + fixes; two Copilot rounds cleared; CI timeout fix (trimmed heavy acceptance tests)

Result: ArcticTundra ~47%→8-16%, HotDesert restored to ~8-10%, forests ~35-40%; visible rain shadows behind belts; shelves submerged ~6%; biomes bend around terrain instead of rigid latitude stripes. Deterministic across thread counts, n=1024 ~16.6s. Follow-up: water-availability hydrology, valley erosion. ✅

✅ Tectonic History Simulation (worldgen realism overhaul)

Spec/Documentation: .claude/plans/tectonic-history.md, /docs/development-log/entries/2026-06-13-tectonic-history-simulation.md Dependencies: World Generation & Creator (M1–M6) Status: complete (PR #136 merged)

Goal: Replace single-pass Voronoi plates + Gaussian-kernel terrain with a coarse time-stepped tectonic history (Euler-pole motion, subduction, ridges with crust age, collisions/sutures, rifting, slab pull, hotspots) upsampled to full resolution; elevation from Airy isostasy + seafloor depth-age law.

Completed Tasks:

  • M-T0–M-T6: headless worldgen-cli + WorldStats; PlateSim coarse sim; Wilson-cycle events (incl. M-T2.5 arc crust, M-T2.6 slab pull, M-T2.7 coherence); CrustStage + crustAge/orogenyAge + PlanetIO v3 (incl. M-T3.5/3.6 signed-distance coastlines); TerrainStage rewrite (incl. M-T4.5 linear belts + geodesic metric); deletion/hardening/edge cases; docs + dev log
  • Self-review (3 agents) + fixes; Copilot review cleared; flaky cancel test fixed

Result: Hexagonal continents and smooth dome mountains gone. Crisp organic coastlines, linear ridged mountain belts (geodesic aspect 5–7), bimodal hypsometry, Earth-like ocean ages, deterministic across thread counts, n=1024 in ~11s. Follow-ups: climate/biome retune, fluvial hydrology. ✅

✅ GameScene Subsystem Extraction

Spec/Documentation: /docs/technical/gamescene-refactoring.md Dependencies: None Status: complete

Goal: Extract placement and selection logic from GameScene into dedicated subsystems. Prevent god-class anti-pattern as gameplay systems grow.

Completed Tasks:

  • PlacementSystem Extraction
    • Create scenes/game/world/placement/PlacementSystem.h/cpp
    • Create scenes/game/world/placement/PlacementTypes.h (shared BuildMenuItem)
    • Move PlacementMode and GhostRenderer ownership
    • Move spawning/relocation logic (spawnEntity, m_relocatingEntityId)
    • Move UI callbacks (toggleBuildMenu, selectBuildItem, beginRelocation)
  • SelectionSystem Extraction
    • Create scenes/game/world/selection/SelectionSystem.h/cpp
    • Create scenes/game/world/selection/SelectionTypes.h (moved from Selection.h)
    • Move Selection state ownership
    • Move handleClick with priority logic
    • Move renderIndicator
    • Selection priority constants in header
  • GameScene Cleanup
    • GameScene is now thin coordinator
    • Subsystems initialized with dependency injection
    • All UI files updated to use new include paths

Result: GameScene reduced from ~900 lines to ~620 lines (placement: ~180 lines, selection: ~100 lines extracted). Subsystems now own their own state and logic. ✅


✅ Main Game UI: Core HUD

Spec/Documentation: /docs/design/main-game-ui-design.md (Sections 1, 2, 5, 9) Dependencies: Main Game UI: Primitives Foundation, UI Architecture: ViewModel Pattern Status: complete

Goal: Implement main gameplay HUD (top bar, colonist list, gameplay bar, zoom).

Completed Tasks:

  • TimeSystem Foundation
    • GameSpeed enum (Paused, Normal, Fast, VeryFast)
    • Season enum with advancement
    • effectiveTimeScale() for time-scaled systems
    • NeedsDecaySystem uses TimeSystem
  • Top Bar
    • Date/Time display (Day X, Season | HH:MM)
    • Game speed controls ([⏸] [▶] [▶▶] [▶▶▶])
    • Hotkeys (Space pause, 1/2/3 speed)
    • Menu button
  • Zoom Controls
    • Floating [+] [⟳] [-] buttons in viewport
    • Home key to reset zoom
  • Colonist List Enhancements
    • Portrait Card (avatar + mood bar + name)
    • Status tint (green/yellow/red background based on mood)
    • Click to select, double-click to follow
  • Gameplay Bar
    • Category dropdowns: [Actions▾] [Build▾] [Production▾] [Furniture▾]
    • Upward menu expansion (openUpward flag)
    • B key for build toggle
  • UI Restructure
    • Created DebugOverlay (extracted from GameOverlay)
    • Created ZoomControlPanel (wrapper for ZoomControl)
    • Deleted GameOverlay and BuildToolbar
    • Layer system refactor for all new components

Deferred:

  • Vertical scrollable colonist list (works fine at current scale, can add if needed)
  • A/Q/R hotkeys (conflict with WASD camera movement)

Result: Full HUD implementation with TimeSystem, TopBar with speed controls, GameplayBar with category dropdowns, enhanced colonist list with mood tints and double-click to follow, and floating zoom controls. ✅


✅ Simple Asset Support (SVG-Only)

Spec/Documentation: /docs/technical/asset-system/asset-definitions.md, /docs/technical/asset-system/folder-based-assets.md Dependencies: None (Folder-Based Asset Migration was done as part of this) Status: complete

Goal: Support hand-crafted SVG assets without Lua scripts via data-driven XML definitions.

Completed Tasks:

  • Folder-per-asset structure (FolderName/FolderName.xml pattern)
  • XML parsing with pugixml (defName, label, assetType, svgPath, worldHeight)
  • Rendering settings (complexity, tier)
  • Per-biome placement with spawn chance, distribution
  • Clumping parameters (clumpSize, clumpRadius, clumpSpacing)
  • Entity relationships (affinity, avoids, requires)
  • Groups with group index for lookups
  • Animation parameters (windResponse, swayFrequency)
  • Capabilities (edible, drinkable, harvestable, carryable, craftable, etc.)
  • Item properties (stackSize, nutrition, spoilable)
  • @shared/ prefix resolution for shared scripts
  • Template caching (tessellated meshes cached)
  • DefName → ID interning for runtime performance

Optional Future Enhancements: Variation (colorRange, scaleRange), inheritance (parent attribute), LOD levels, shared SVG components (@components/).

Result: Assets like Reed, BerryBush, Berry, Stick, SmallStone, CraftingSpot all use this system. New simple assets can be added by creating a folder with XML + SVG. ✅


✅ Ground Texture System

Spec/Documentation: /docs/technical/ground-textures.md, /docs/development-log/plans/2025-12-22-ground-texture-system.md Dependencies: None Status: complete

Goal: Replace flat-color tiles with textured terrain using hybrid Tier 1 (rasterized texture) + Tier 3 (vector grass) approach, with hard/soft edge blending.

Completed Tasks:

  • Render-to-Texture Infrastructure
    • Create RenderToTexture class (FBO wrapper with RAII)
    • Unit tests for RenderToTexture
  • Tile Texture Atlas
    • TileTextureAtlas class (atlas allocator)
    • TileAtlasBuilder (builds atlas from SVG patterns)
    • TilePatternBaker (rasterizes SVG to RGBA)
    • Fallback checker pattern for missing SVGs
  • Tile Pattern Assets (6 of 10 surfaces)
    • Grass, GrassShort, GrassTall, GrassMeadow (basic patterns)
    • Dirt (rich: pebbles, cracks, dried grass)
    • Water (rich: ripples, reflections, depth patches)
  • Surface Family System
    • SurfaceFamily enum (Ground, Water, Rock)
    • getSurfaceFamily() and getHardEdgeMaskByFamily()
    • getSurfaceStackOrder() for blend direction
  • Shader Integration
    • uber.frag tile render mode (kRenderModeTile = -3.0)
    • tile.glsl with blend weight functions
    • Early-out optimizations for interior tiles/pixels
  • ChunkRenderer Integration
    • drawTile() with all 8 neighbor IDs + masks
    • World tile coordinates for procedural variation
  • Soft Edge Blending
    • computeHigherBleedWeights() - cardinal blending
    • computeDiagonalCornerWeights() - diagonal corners
    • computeTileEdgeDarkening() - procedural edge noise

Optional Future Work: Add missing patterns (Sand, Rock, Snow, Mud), enrich grass patterns, tune grass entity density.

Result: Tiles render with textured patterns, soft blending between same-family surfaces, hard edges at family boundaries (shorelines, cliffs). ✅


✅ UI Event System

Spec/Documentation: /docs/technical/ui-framework/event-system.md Dependencies: None Status: complete

Goal: Replace manual hit-testing boilerplate (~69 lines of QUICKFIX code) with event consumption. Components call event.consume() to stop propagation. MouseMove events handle hover state.

Completed Tasks:

  • Event Infrastructure
    • Create InputEvent struct with type, position, consumed flag
    • Add handleEvent() to IComponent interface
    • Add containsPoint() to IComponent for hit testing
  • Component Updates
    • Update Button to use handleEvent() and consume clicks
    • Update TabBar to use handleEvent()
    • Migrate BuildToolbar, BuildMenu, ColonistListPanel
    • Migrate EntityInfoPanel, TaskListPanel
  • Dispatch System
    • Add dispatchEvent() to Component base class
    • GameUI dispatches to all children in z-order
    • GameScene dispatches MouseMove, MouseDown, MouseUp events
  • QUICKFIX Cleanup
    • Remove isPointOverUI() from GameUI, GameOverlay
    • Remove isPointOver() from ZoomControl, BuildToolbar, BuildMenu
    • Remove handleInput() polling from all migrated components

Deferred: Debug Integration (hit-test endpoint, SSE events) - can be added when needed.

Result: Clean event propagation model. Adding new UI panels no longer requires updating multiple files. Components consume events to prevent click-through. ✅


✅ UI Architecture: Input System Cleanup

Spec/Documentation: /docs/technical/ui-framework/event-system.md Dependencies: UI Event System Status: complete

Goal: Complete the event-based input architecture. Remove handleInput(float dt) (wrong pattern per Game Programming Patterns) in favor of handleInput(InputEvent&).

Completed Tasks:

  • Remove handleInput() from ILayer/Component (components don't poll)
  • Add handleEvent() to TextInput (was missing)
  • Container::handleEvent() dispatches to children
  • Application creates InputEvents and dispatches to scene
  • Rename handleEvent to handleInput on IScene (consistency)
  • Remove handleInput(float dt) from IScene (wrong pattern)
  • Remove handleInput(float dt) from SceneManager
  • Update all scenes to implement handleInput(InputEvent&)
  • Add IOverlay interface for cross-scene UI (NavigationMenu, future ESC menu)
  • SceneManager manages overlays as peers to scenes
  • Test all scenes

Architecture (Industry Best Practice):

while (running) {
    processInput();    // No dt - discrete events
    update(elapsed);   // dt here - advance simulation
    render();
}

Key insight: Input handling does NOT need delta time. It captures discrete events ("what happened?"). Delta time belongs in update() where simulation advances ("how much time passed?").

Result: Clean separation between discrete input events and continuous simulation updates. Scenes receive InputEvent& from Application and forward to UI components. Keyboard polling (WASD, ESC) happens in update(). ✅


✅ UI Architecture: FocusManager Simplification

Spec/Documentation: /docs/technical/ui-framework/focus-management.md Dependencies: UI Architecture: Input System Cleanup Status: complete

Goal: Reduce ~40 lines of FocusManager boilerplate per focusable component via CRTP base class.

Completed Tasks:

  • Create FocusableBase CRTP template (libs/ui/focus/FocusableBase.h)
    • Auto-register in constructor
    • Auto-unregister in destructor
    • Handle move semantics correctly (unregister old, register new)
  • Migrate Button to use FocusableBase
  • Migrate TabBar to use FocusableBase
  • Migrate TextInput to use FocusableBase

Result: Components now inherit from FocusableBase<T> and use = default for move constructor/assignment. FocusManager registration is automatic. ~120 lines of boilerplate removed across 3 components. ✅


✅ UI Architecture: ViewModel Pattern

Spec/Documentation: /docs/technical/ui-framework/data-binding.md, /docs/development-log/plans/2025-12-24-viewmodel-pattern.md Dependencies: None Status: complete

Goal: Establish clear data ownership and efficient updates via ViewModel pattern.

Completed Tasks:

  • Create directory structure (scenes/game/ui/{adapters,models,panels,components})
  • Create UIState.h with Selection struct
  • Create ColonistAdapter (ECS query layer)
  • Create ColonistListModel with change detection
  • Migrate ColonistListPanel to use ViewModel
  • Move SelectionAdapter to adapters folder
  • Move CraftingAdapter to adapters folder
  • Create EntityInfoModel with UpdateType enum
  • Migrate EntityInfoPanel to use ViewModel
  • File reorganization
    • Move panels to panels/ (EntityInfoPanel, TaskListPanel, BuildMenu, BuildToolbar, GameOverlay)
    • Move reusable components to components/ (NeedBar, ZoomControl, InfoSlot, Selection)
    • Move world rendering to world/ (GhostRenderer, PlacementMode, NotificationManager)
    • Move GameUI to scenes/game/ui/
    • Delete old components/ directory

Architecture Notes:

  • Pull-based models: refresh(world) returns bool for change detection
  • Adapter layer: Centralizes ECS queries (ColonistAdapter, SelectionAdapter, CraftingAdapter)
  • UpdateType enum: None, Values, Structure, Show, Hide for tiered updates

Result: Clean separation between data (models), ECS queries (adapters), rendering (panels), and reusable UI elements (components). ✅


✅ UI Architecture: Theme System

Spec/Documentation: /docs/development-log/plans/2025-12-25-ui-theme-system.md Dependencies: None Status: complete

Goal: Centralize UI styling (colors, spacing, typography) via design tokens. Eliminate hardcoded color values across views.

Terminology:

  • Panel (design) = Visual style (dark bg, 1px border)
  • View (structural) = Composite UI element (EntityInfoView, TaskListView)
  • Component = Base class for all UI elements (unchanged)

Completed Tasks:

  • Create libs/ui/theme/ directory with Theme.h and PanelStyle.h
  • Design tokens: Colors (panel, text, status), Spacing, Typography, Borders
  • Panel style factories: floating(), closeButton(), actionButton(), card(), selection()
  • Rename panels/ folder → views/
  • Rename EntityInfoPanel → EntityInfoView
  • Rename TaskListPanel → TaskListView
  • Rename ColonistListPanel → ColonistListView
  • Apply theme tokens to EntityInfoView
  • Apply theme tokens to TaskListView
  • Apply theme tokens to ColonistListView
  • Apply theme tokens to BuildMenu

Deferred (Phase 2):

  • Edge mask support for docked panels (per-edge border control)
  • Per-corner radius when edges are removed

Result: All views now use centralized theme tokens from libs/ui/theme/. Hardcoded colors eliminated. Consistent visual identity across all panels. ✅


✅ UI Architecture: Layout System

Spec/Documentation: /docs/development-log/plans/warm-honking-hedgehog.md Dependencies: None Status: complete

Goal: Add automatic layout containers for component positioning via uniform layout API on all UI elements.

Design Decisions:

  • Uniform API on IComponent — All UI elements (components + shapes) participate in layout via getWidth()/getHeight()/setPosition() + margin
  • CSS-like margin — Margin adds to position (content draws inside) and adds to reported size
  • Single LayoutContainer — Direction attribute (Vertical/Horizontal) instead of separate VStack/HStack
  • No Spacer, no flex — Use margins for spacing between elements
  • Hybrid sizing model: Stacking axis is child-driven (query sizes), cross axis is parent-driven

Completed Tasks:

  • Add layout API to IComponent interface (getWidth/getHeight/setPosition/margin)
  • Add default implementation to Component base class
  • Implement layout API on all Shapes (Rectangle, Circle, Line, Text)
  • Update Button to use base class size/position
  • Update TextInput to use base class size/position
  • Update TabBar to use base class size/position
  • Create LayoutTypes.h (Direction, HAlign, VAlign enums)
  • Implement LayoutContainer (extends Container)
    • Vertical stacking with HAlign (Left/Center/Right)
    • Horizontal stacking with VAlign (Top/Center/Bottom)
    • Dirty flag for layout caching
    • Container margin offsets children
  • Update CMakeLists.txt
  • Create LayoutScene demo in ui-sandbox
  • Unit tests (14 tests covering all layout scenarios)
  • View Migrations
    • Create ColonistListItem component (portrait + name + mood bar)
    • Migrate ColonistListView to use ColonistListItem + LayoutContainer
    • Create SectionHeader component (generic section title)
    • Create StatusTextLine component (status-colored task line)
    • Migrate TaskListView to use SectionHeader + StatusTextLine + LayoutContainer

Result: LayoutContainer automatically positions children based on their reported sizes. Components use CSS-like margin for spacing. All UI elements participate in layout through uniform API. ColonistListView and TaskListView now use automatic layout instead of manual yOffset tracking. ✅


✅ Main Game UI: Complex Components

Spec/Documentation: /docs/design/main-game-ui-design.md (Section 17) Dependencies: Main Game UI: Primitives Foundation (complete) Status: complete

Goal: Build components for information-dense screens (resources, dropdowns, notifications).

Completed Tasks:

  • Icon Component
    • SVG rendering with tessellation pipeline (loadSVG → Tessellator → drawTriangles)
    • Tinting/colorization support
    • Unit tests (11)
    • IconScene demo
  • Tree View Component
    • Expandable/collapsible nodes (▶/▼)
    • Nested hierarchy with indentation
    • Flattened rows pattern for efficient iteration
    • Unit tests (16)
    • TreeViewScene demo
  • Dropdown Button Component
    • Button with ▾ indicator
    • Expands menu panel on click
    • Closes on focus lost via FocusableBase
    • Keyboard navigation (Up/Down/Enter/Escape)
    • Disabled item support
    • Unit tests (17)
    • DropdownScene demo
  • Toast + Toast Stack
    • Notification popup with title, message, dismiss button
    • Auto-dismiss timer with countdown display
    • Persistent mode (autoDismissTime = 0)
    • Severity styling (Info/Warning/Critical colors)
    • Fade in/out animation
    • ToastStack container with vertical stacking
    • Anchor positions (TopRight, TopLeft, BottomRight, BottomLeft)
    • Max toasts limit with oldest removal
    • Unit tests (23: 14 Toast + 9 ToastStack)
    • ToastScene demo

Result: All complex components implemented with theme-based styling, layout integration, and comprehensive test coverage (67 new tests total). Components use minimal constructors with sensible defaults. ✅


In Progress Epics

Build & Test Speed Improvements

Spec/Documentation: /docs/technical/build-performance.md Dependencies: none Status: in progress (Specboard epic; baseline measured 2026-07-03: CI gate 49 min, local MSBuild serial-per-project)

Goal: Ninja + compiler caching everywhere (ccache local, sccache CI), path-gated heavy worldgen tests, parallel/sharded ctest. Target: ~10-13 min CI gate on non-worldgen PRs; local clean builds in minutes, fresh-worktree builds mostly cache replay.

Tasks:

  • CI overhaul: sccache, Windows CI on Ninja, heavy bucket sharded + moved to path-gated tests-heavy.yml (PR #252, merged)
  • Local builds: Ninja Multi-Config + ccache presets, setup-msvc-env.ps1, foundation link hygiene (PR #253, merged)
  • PCH rollout after measuring cache interaction
  • Measurement week: fill spec Results table, revisit deferred items (lld-link, test selection)

Salvage UI Cutover (one unified UI library)

Spec/Documentation: /docs/design/ui/ Dependencies: UI Design System (Salvage) — extraction Status: core complete — every view/screen/widget styles off theme/Tokens.h; legacy Theme.h + PanelStyle.h deleted (PRs #164/#167/#171/#174/#175/#176/#177/#178/#180/#181, see dev log 2026-06-18-salvage-ui-cutover.md). Remaining: full dialog redesign (deferred).

Goal: One Salvage-styled UI library. Re-style the existing libs/ui widgets to the approved look via design tokens, fold the render-only design-system widgets into it, delete the duplicates, then rebuild the HUD, dialogs, and world creator to the prototype designs.

Tasks:

  • Salvage primitives + tokens + icons + fonts in the engine (Panel, Button, ProgressBar, Stat, Badge, Avatar, Slider, Tooltip, Dialog, ...)
  • Inline render styles: gradient fills, soft shadow/glow (SDF), text-align/letter-spacing/text-transform
  • Phase 1: tokens to theme/, non-dup widgets to components/, flatten UI::DS->UI, merge the 7 duplicate widgets, update ui-sandbox + CMake
  • Phase 2: restyle the remaining legacy widgets onto Salvage tokens
  • Global z-index draw queue (BatchRenderer group sort, perf-gated) so popups float over siblings
  • Reconcile onto current main (merge; only status.md conflicted; renderer merged clean; fixed stale widget tests; whole solution builds, 288 ui-tests + 79 renderer-tests pass; sandbox + game verified)
  • Phase 3: rebuild HUD views to the prototype (top bar, colonist roster, info panel, command bar, right stack; vector-drawn symbols)
  • Phase 3: rebuild WorldCreatorScene to the WorldGen prototype
  • Phase 4: tokenize the remaining shared widgets + dialogs; inline the Dialog/Tooltip/Icon layout constants; delete theme/Theme.h + PanelStyle.h
  • Dialog terminology: "Dialog" is the type, "modal" is a property (#186); renamed SalvageModalScene + design-system "Modal" primitive to Dialog
  • De-hand-roll the dialog lists: new ListRow primitive; CraftingDialog recipe list (#187) and StorageConfigDialog item/category list (#188) rebuilt on it. No hand-rolled selectable lists or hardcoded washes remain; the colonist dossier + tabs were already composed.
  • Optional polish: full prototype-fidelity pass on the dialogs (tabbed dossier treatment, footers) — done in the Game UI to Prototype Polish epic
  • Re-wire or delete the orphaned per-colonist TaskListView — resolved 2026-06-29: it is the task-arbitration decision inspector, opened via the T hotkey (not orphaned)
  • Untangle ui from engine and move FontRenderer into renderer, ahead of the salal extraction (PRs #292/#293/#294 open; tracked in Specboard)

Fluvial Erosion (worldgen)

Spec/Documentation: .claude/plans/erosion.md, /docs/development-log/entries/2026-06-15-worldgen-fluvial-erosion.md Dependencies: Water Availability (drainage) Status: in progress (PR #149, draft)

Goal: Carve valleys into the continental terrain so rivers (rendered later from the climate drainage) land in real valleys. Detachment-limited stream-power incision (Braun & Willett implicit solver) on the drainage stack, between Terrain and Atmosphere; downstream climate/biomes/final drainage all see the carved terrain.

Tasks:

  • E-0: dissection metrics baseline (WorldStats + worldgen-cli)
  • E-1: ErosionStage core (shared DrainageRouting helper + implicit stream-power) + pipeline integration
  • E-2: downstream re-validation (carved terrain through climate/biomes/final drainage; determinism; budget)
  • E-3: strength at conservative subtle default (accepted)
  • E-4: dev log + status (this) on the draft PR
  • Mark PR #149 ready, clear CI + Copilot, merge

Result: Valleys carved deterministically (worldHash bit-identical across thread counts); mountains preserved (belt crests stay tall); world-tests green (174); gen ~22s at n=1024. Follow-ups: the bathymetry "comb" artifact (hex-BFS distance terracing on the shelf edge + crust-age depth field) is a separate deferred tuning task; then 2D chunk-time river/lake rendering.

World Generation & Creator

Spec/Documentation: /docs/design/features/world-generation/, .claude/plans/world-generation.md Dependencies: None Status: in progress

Goal: Real 8-phase world generation (plates → terrain → climate → biomes), WorldCreator scene with 3D planet view and landing site selection, wired into New Game → 2D gameplay sampling the generated world.

Tasks:

  • M1: Foundation primitives (TaskPool, RNG, HashNoise, DeterministicMath, WorldHash)
  • M2: worldgen core + frozen contracts (SphereGrid, WorldData, pipeline skeleton, debug image exporter, technical doc)
  • M3a: Plates + plate movement (P1, P2)
  • M3b: Terrain + sea level (P3) — ends with USER screenshot review gate
  • M3c: Atmosphere + temperature (P4)
  • M3d: Precipitation + rivers (P5)
  • M3e: Oceans, biomes, snow, summary (P6–P9)
  • M3f: planet-view lib (renderer, camera, picker, colorizer; chunked-LOD deferred to M3f-2)
  • Hex conversion + scalable crisp globe rendering (.claude/plans/lets-work-on-the-serene-waterfall.md)
    • Phase 1: SphereGrid Goldberg hex semantics (vertex-centered tiles, 10n²+2, cube-round assignment, 6-neighbor offsets, locateHex)
    • Phase 2: consumers re-baselined (neighbors=6, locateHex sampling, PlanetIO version bump)
    • Phase 3: two-tier crisp rendering — base mips (async bake, dirty-flag coalescing) + detail page cache (130×130 pages, 2D-array atlas, LRU, page table), per-pixel hex assignment in planet.frag, camera deep-zoom near-plane + n-aware min distance. Supersedes the M3f-2 "chunked LOD" placeholder.
    • Phase 4: docs + dev-log entry — world-generation-implementation.md (Goldberg grid, TileId amendment, frozen-contract amendments, locateHex, diagonal B-D fix, PlanetIO v2); planet-view-rendering.md (two-tier architecture, scaling table, budgets); 3d-to-2d-sampling.md (locateHex addendum); data-model.md + technical-notes.md (hexes now literal); dev log 2026-06-12-worldgen-hex-goldberg.md
    • Phase 5: end-to-end verification (New Game flow, far-tier washout fix, color-mode cycling, zoom crispness, Quick Start v2 cache save/load) + PR
  • M3g: UI Slider + WorldCreator shell
  • M3h: Biome taxonomy migration (engine, 8→21 biomes, sparse BiomeWeights)
  • M4: PlanetSampler + GeneratedWorldSampler + GameLoading branch
  • M5: WorldCreator integration (real generator + planet view)
  • M6: Landing site + handoff + MainMenu rewire (e2e New Game)
    • Quick Start: cached pre-generated planet (PlanetIO save/load), bypasses generation
    • Persist accepted world on landing confirm
    • Landing site local preview + difficulty rating (UX spec, deferred)
  • M7: Hardening, benchmark-gated default resolution, cross-platform determinism
    • Input-validation envelope + fail-loud reason channel (PlanetParams::validate, GenerationError, bad_alloc/NaN guards)
    • Golden full-pipeline worldHash gate (PlanetGeneratorHeavy.GoldenWorldHash; dual-platform CI = cross-platform gate); worldgen-cli --expect-hash
    • Benchmark-calibrated default n (sweep on reference machine; kDefaultGridSubdivision=1024, documented). See dev log 2026-06-26-worldgen-m7-hardening.md
  • Quickstart planet: prebuilt + shipped at max res (n=2048), build-time bake (worldgen-cli --save-planet + quickstart-planet CMake target); loader load-only, menu disables Quick Start when absent. Never generated at runtime. See dev log 2026-06-26-quickstart-prebuilt-planet.md
  • Future: planet database — mmap/streamed reads from PlanetIO files for n>=4096 planets instead of whole-planet RAM residency (PlanetIO v1 SoA layout is already offset-addressable; see development log)

Building & Construction System

Spec/Documentation: /docs/design/game-systems/world/building-construction.md (design), /docs/technical/building-construction-architecture.md (architecture) Dependencies: Goal-Driven Task Generation (build/haul task sources); Navigation & Pathfinding before walls ship as gameplay — DONE (nav v1 landed 2026-06-16: walls/water/trees block movement, colonists route around them and through doors); Material economy — extend the early crafting implementation with choppable trees and construction material items (axe/chop work in flight; chains grow as systems need them) Status: in progress

Goal: Freeform polygon building: foundation blueprints drawn on the map, walls on foundations with snapping and edge-fill, doors/windows as parameterized vector assets, automatic room detection. Deliver-then-build loop with work-driven procedural construction visuals.

Tasks:

  • Epic A: Geometry foundations (libs/geometry in-house: int64-mm core + Int128, exact predicates, polygon constraint primitives, planar arrangement + half-edge face extraction, ring booleans, wall band offsetting + junction trimming; 157 unit tests) — merged to main (#135)
  • Epic C: Foundations end-to-end — merged to main (#137, hardened by an adversarial review: goal-collision umbrella restructure, deterministic option ordering, fail-open validation, deferred-demolish UAF, more). Verified in sandbox: draw a foundation, colonist chops palms for Wood, hauls it to the site, builds it to completion, renders progress. Polish items remain (see sub-list).
    • Config + ConstructionRegistry + ConfigValidator (materials/constraints/snapping, meters + mm mirrors)
    • ConstructionWorld topology store (commit/add/subtract/remove via geometry booleans, overlap rejection, hit-test, version counter)
    • Blueprint ECS components (Structure, StructureBlueprint manifest+work+phase, StructureHealth)
    • DrawingSystem + FoundationTool + SnapEngine + ConstructionValidator + config strip (verified in sandbox: draw → commit → blueprint entity → toast)
    • Selection + info panel adapter + immediate demolish (verified in sandbox)
    • Material economy: Wood item + choppable Oak/Maple trees (reuses Harvestable path)
    • Build/Deconstruct actions (skill-scaled workDone += rate×dt, completion callbacks; 14 tests)
    • ConstructionSystem lifecycle (Clearing→AwaitingMaterials→UnderConstruction→Complete; clear/haul/build goals; blueprint-inventory delivery; build-progress render ramp)
    • Choppable palm trees added to the Beach biome (Wood source at spawn) so the loop is exercisable
    • End-to-end proof of chop→haul→build in a live world — verified in sandbox (foundation built to completion, ~1 min sim time). Fixed a goal-thrashing bug found in the process (harvest demand now bounded by carried Wood; harvest→haul chained for delivery stickiness).
    • Realistic harvest loop + task-chaining UI: mass-based per-trip carry cap (35 kg → 14 wood/trip), axe required to chop (player-provisioned, no auto-equip), wood-unit tree pools clamped to carry weight; chained Cut→Haul→Build verified live on a dedicated port. Plus the UI/AI fixes from verifying it: calculatePriority() for in-progress (Selected) work tasks, friendly task labels, full-width info-panel task lines, "Next" chain step, build-progress percent + on-map fill, and the global task list now showing the Build umbrella + who's working each task. See dev log 2026-06-20-carry-weight-axe-gated-harvest.md.
    • Polish (deferred): baked element-emitter index-prefix progress render (D8; the alpha-ramp progress fill + the info-panel build percent (D11) now cover basic feedback), N discrete builder work slots from builderCap, deconstruct material refund + cascade, mining/haul-away clearing of non-harvestable obstructions
  • Epic D: Walls — draw/build/select/demolish, verified in sandbox (draft PR #138). Polyline wall chains on a foundation, T-junction split, band+junction rendering, build via the shared lifecycle (gated on host-foundation-built), per-segment selection/panel/demolish.
    • Wall topology in ConstructionWorld (vertices/segments/openings, T-junction split + opening re-attach, X-crossing rejection, atomic commit); 18 tests
    • Wall config (thickness presets Light/Standard/Heavy, wall constraints) + validation; 30 tests
    • SnapEngine.snapWall (endpoint/vertex/T-junction/edge/angle) + wall draw-time validation (length/angle/containment/overlap/clearance/X-crossing); 27 tests
    • WallTool (chain draw, Ctrl+click edge fill, commit→segment blueprint entities) + interim band/junction render via WallOffset + config strip wall mode; verified in sandbox
    • Per-segment selection + adaptWallSegment panel + band-outline indicator + immediate per-segment demolition; verified in sandbox
    • Hardened: snap endpoint-vs-T-junction, validator T-junction exemption, atomic commitSegment, harvest demand bounded to carry capacity (structures needing >1 stack build over multiple trips)
    • D5: obstacle/portal publication to nav — walls and openings now feed the navmesh via NavInputBuilder (nav v1, 2026-06-16); colonists route around walls and pass through doors
    • Deferred: work-driven Deconstruct + refund + host-can't-demolish-while-walls-stand guard (same deferred polish as foundations); partial edge-fill
  • Epic E: Rooms — detection + room entities + room-formed toast + identity persistence (feature/construction-rooms). Verified in sandbox: a closed built-wall loop fires "Room formed"; an interior divider splits it and the rep-containing half keeps its name.
    • RoomDetection pure core (built wall centerlines → geometry arrangement/half-edge face extraction → bounded faces as rooms; openings don't break enclosure); 6 tests
    • RoomDetectionSystem (polls ConstructionWorld.version(), reconciles against persistent room records, max-overlap identity so names survive edits, spawns/refreshes/retires room entities, room-formed callback seam); 6 tests
    • Room ECS component + GameScene wiring (register system, "Room formed" toast via the engine→UI callback seam)
    • /api/dev/walls dev command (stamp a built wall loop in one call; rooms testable without the draw tool); reused for sandbox verification
    • Hardened (adversarial review): OnBoundary fallback so a divider through a room's rep keeps identity on one side; dev-walls T-split only force-builds chain segments (not split halves of pre-existing blueprints)
    • Rooms overlay UI: scene-owned RoomOverlay tints/outlines/labels each room (concave-correct via renderer::Tessellator), click-to-select (overlay-gated) → read-only info panel (Name/Area/enclosing walls), HUD "Rooms" toggle synced with the R hotkey (feature/rooms-overlay)
    • Deferred: nested room-in-room (loop inside a loop, no connecting wall) identity/area needs hole-aware face extraction (pinned by a test); room types/functions/bonuses (post-v1)
  • Epic F1: Openings end-to-end (interim visuals) — doors/windows on walls (feature/construction-openings). Verified in sandbox: a Door placed on a built wall shows a gap in the wall band with the door fill; clicking selects it (panel: Type/Material/Pathable/State/Materials/Work + Demolish).
    • F1a engine: opening types config (Door 0.9m pathable, Window 0.6m) + ConfigValidator; ConstructionValidator.validateOpening (margins, overlap, length, type/material); SnapEngine.snapOpening; ConstructionWorld setOpeningState/Entity/removeOpening
    • F1b lifecycle: openings in the build loop (own materials + constant work), gated on host segment built (isOpeningHostSegmentBuilt)
    • F1c app: OpeningTool (slide along wall, validate, commit→addOpening+spawn blueprint) + config strip + GameplayBar Door/Window + /api/dev/opening
    • F1d render: interim wall-band gap + procedural door/window fill + ghost (Primitives)
    • F1e selection: OpeningSelection (priority above walls) + point-in-footprint hit test + adaptOpening panel + per-opening demolish
    • Hardened (adversarial review): wall-demolish now despawns hosted openings' entities (removeSegment surfaces them); openingMarginMeters sign-checked; dev helpers include Opening
    • F2 (deferred): D9 parameter-extended procedural Lua door/window assets (cache key (defName,thicknessPreset,material), material palettes). (Portal publication to nav is DONE — doors/windows feed the navmesh, doors pathable, windows solid.) NOTE: retrofit-cut-as-work is CUT from scope — openings sit on the wall and never cut it (design decision 2026-06-15).
  • Epic G: Editing & polish
    • Demolish-building cascade + work-driven demolish (deconstruct task + material refund) + foundation-demolish gate (#143)
    • Outer-face-flush wall snapping so walls build along foundation edges (#147)
    • G2: click-cycling selection (repeated click cycles opening → wall → foundation)
    • G3: foundation add/subtract tool (merge/subtract via the geometry booleans): in-place edit of an editable blueprint, extension blueprint merged on build for a built foundation, panel Add/Subtract, /api/dev/foundation-edit. See dev log 2026-09-28-foundation-add-subtract.md
    • Deferred: vertex editing (drag/add/delete on a foundation blueprint), full Shift-click multi-select, double-click connected wall-run select

Goal-Driven Task Generation

Spec/Documentation: /docs/design/game-systems/colonists/task-registry.md, /docs/technical/task-generation-architecture.md Dependencies: Task Ordering System (complete) Status: in progress (core landed in PR #115; item reservations and Memory push integration remain)

Goal: Refactor task generation from discovery-driven (see item → create task) to goal-driven (goal exists → create task using Memory for fulfillment). This fixes the issue of thousands of invalid tasks appearing in the global task list.

Architecture Change:

  • Discovery → Updates Memory (what colonists know about)
  • Goals → Generate Tasks (what needs to be done)
  • Tasks exist at goal-level (~200), not item-level (~100,000)
  • Reservations are item-level (allows parallel work by multiple colonists)

Tasks:

  • Phase 1: Remove Discovery-Based Task Generation
    • Remove VisionSystem task creation for Carryable items
    • Remove VisionSystem task creation for Harvestable items
    • Clean up GlobalTaskRegistry discovery-driven methods (registry deleted entirely)
  • Phase 2: Goal Source Integration
    • StorageGoalSystem creates Haul goals when capacity available
    • CraftingGoalSystem creates Craft + Harvest + Haul goal hierarchies when recipe queued
    • NeedsSystem creates FulfillNeed tasks when need below threshold (already correct)
    • BuildGoalSystem creates PlacePackaged goals when build order placed
  • Phase 3: Two-Level Task/Reservation Model
    • GoalTask struct (destination, type, acceptedTypes)
    • Reservation system at item-level (prevents conflicts; the unwired API was removed in PR #115, needs real integration with AIDecisionSystem/ActionSystem)
    • availableCount() computation (known items minus reserved; currently target minus delivered)
  • Phase 4: Memory Integration
    • Memory notifies registry of fulfillment options (not tasks)
    • Task availability updates based on Memory changes
    • Colonist filtering by what they know (AIDecisionSystem matches goals against colonist Memory)
  • Phase 5: UI Updates
    • Task list shows goal-level tasks with parent/child hierarchy
    • Global task list shows the full construction chain (Cut → Haul → Build umbrella) and who is actively working each task (status reads "Working - Bob" / "Building - Bob (16%)" instead of "Unassigned")
    • "Blocked" status when no fulfillment options known (construction shows "Needs materials"; the general no-known-source case still pending)
    • Sub-demand display for multi-type storage

✅ Storage and Hauling System

Spec/Documentation: /docs/design/features/storage-system.md, .claude/plans/storage-and-hauling.md Dependencies: Main Game UI: Colonist Details Dialog (complete) Status: complete

Goal: Allow crafting furniture (shelves, boxes), automatic hauling of loose items to storage.

Completed Tasks (All Phases):

  • Phase 1+3: ItemCategory, StorageCapability, handsRequired parsing
    • ItemCategory enum (None, RawMaterial, Food, Tool, Furniture)
    • StorageCapability struct (acceptedCategories, maxCapacity, maxStackSize)
    • handsRequired field on AssetDefinition (1 or 2 hands)
    • XML parsing for category, handsRequired, storage capability
  • Phase 2: Inventory hand slots
    • leftHand/rightHand optional ItemStack
    • Hand query methods (freeHandCount, hasHandsFree, isHolding)
    • Hand mutation methods (pickUp, putDown, stowToBackpack, takeFromBackpack)
    • Two-handed items can't fit in backpack (enforced by stowToBackpack)
  • Phase 4: Packaged component + Place/Package UI
    • Packaged ECS component (marker for unplaced furniture)
    • FurnitureSelection type with isPackaged flag
    • ActionButtonSlot for [Place]/[Package] buttons
    • Selection adapter and UI rendering support
  • Phase 5: Container assets & recipes
    • BasicShelf asset (Tool storage, 20 slots)
    • BasicBox asset (RawMaterial storage, 50 slots)
    • Placeholder SVGs for both
    • Recipes (10 Sticks + 5 PlantFiber for shelf, 8 Sticks + 3 PlantFiber for box)
    • Added category to Stick, SmallStone, PlantFiber (RawMaterial) and Berry (Food)
  • Phase 6-7: Haul task/action + ground item spawning
    • TaskType::Haul in TaskType enum
    • ActionType::Deposit for storage deposits
    • Two-phase haul action (Pickup at source → Deposit at storage)
    • Haul task fields (haulItemDefName, haulSourcePosition, haulTargetStorageId, haulTargetPosition)
    • Storage containers get Inventory component when spawned
  • Phase 8: AI haul evaluation
    • evaluateHaulTask in AIDecisionSystem::buildDecisionTrace
    • Priority Tier 6.4 (between crafting and gathering)
    • Find loose Carryable items and match to storage containers by ItemCategory
    • ECS view for storage containers with actual entity IDs

✅ Main Game UI: Colonist Details Dialog

Spec/Documentation: /docs/design/main-game-ui-design.md (Section 8) Dependencies: Main Game UI: Interaction Components (complete), Main Game UI: Primitives Foundation (complete), UI Architecture: ViewModel Pattern (complete) Status: complete (merged PR #96)

Goal: Full colonist information display with 5 tabs, live updates while game runs.

Completed Tasks:

  • Dialog Structure (ColonistDetailsModel, ColonistDetailsDialog, GameUI integration)
  • Bio Tab (name, mood, current task)
  • Health Tab (8 needs as ProgressBars, mood summary)
  • Social Tab (placeholder)
  • Gear Tab (inventory items)
  • Memory Tab (TreeView with collapsible categories, scrollable)
  • Refactoring (tabs/ subfolder, TabStyles.h)

Completed MVP (Consolidated)

The following MVP epics have all been completed. Detailed task breakdowns are preserved here for reference:

✅ MVP Complete - All Core Systems Implemented

Status: complete (Dec 2025)

Summary: Full MVP implementation with autonomous colonist survival loop.

Completed MVP Epics:

  • Colonist Entity + ECS Foundation - Custom ECS with sparse set pattern, colonist spawning
  • Needs System - 4 needs (Hunger, Thirst, Energy, Bladder) with decay and thresholds
  • World Entities - Capability system, Berry Bush, Water Tiles, Bio Pile
  • Memory System - Vision-based entity discovery, no omniscient pathfinding
  • AI Decision System - Priority-based decision hierarchy (Tiers 3, 5, 7)
  • Movement & Pathfinding - Direct movement to targets with arrival detection
  • Actions System - Eat, Drink, Sleep, Toilet actions with side effects
  • Player Observation UI - Selection, need bars, task queue display

Key Technical Components:

  • ECS: EntityID with generations, ComponentPool, Registry, View, ISystem, World
  • Systems: VisionSystem, NeedsDecaySystem, AIDecisionSystem, MovementSystem, PhysicsSystem, ActionSystem, DynamicEntityRenderSystem
  • Components: Position, Rotation, Velocity, MovementTarget, Appearance, Colonist, NeedsComponent, Memory, Task, Action, DecisionTrace

Result: Colonist survives indefinitely, discovers entities through wandering, fulfills needs autonomously, and proactively gathers food when inventory is empty ✅


Deferred Epics

⏸️ Complex Flora CPU Optimization (deferred)

Spec/Documentation: /docs/technical/vector-graphics/animation-performance.md Dependencies: Vector Graphics Validation (completed) Status: deferred

Scope: Tier 2/3 CPU-side optimization (arena allocators, temporal coherence caching, SIMD Bezier flattening) for complex close-up world objects with true Bezier curve deformation (large trees), capped count, high zoom only. This is NOT the grass/groundcover path and NOT wind: dense groundcover renders via static GPU instancing and animates in the vertex shader (see Living Environment Rendering). Renamed from "Animated Vector Graphics Performance Optimization" because the old name collided with wind animation, which this epic does not own.

Reason deferred: MVP game systems take priority. GPU instancing already gives sufficient performance for current needs.

Remaining Work (deferred):

  • Phase 1: CPU Optimization Stack (arena allocators, temporal coherence, SIMD Bezier)
  • Phase 3: Tiered selector (route complex assets between the CPU and instanced paths by distance/complexity)

Planned Epics

UI Scale setting

Spec/Documentation: docs/design/ui/ui-scale-setting.md Dependencies: Settings screen Status: needs spec

Goal: One user-facing setting that scales the entire UI uniformly. The game renders the UI denser than the Salvage prototype (the logical viewport is ~2.5x the prototype's reference, so token-built elements come out ~19% of screen width where the mock is ~47%). A single global UI-scale factor applied at the logical-viewport level lets players size the UI to match the prototype's proportions, instead of hand-enlarging individual screens.

Tasks:

  • Calibration pass: measure current logical viewport vs the prototype's 1600x1000 reference; pick a default scale
  • Apply a single UI-scale factor at getLogicalViewport() derivation (layout, not bitmap post-scale); confirm DPI isn't already folded in
  • Verify pointer hit-testing stays aligned with the scaled draw space
  • Live re-layout on change (open dialogs/screens reflow, no reload)
  • Settings-screen control (slider/stepped) + persistence + reset; confirm MSDF text + tessellated icons stay crisp at the extremes

In-game dossier fidelity (remaining)

Spec/Documentation: docs/design/ui/screens/in-game.md ("Colonist details dialog"), prototype at docs/ui-prototype/src/screens/InGame/, mocks docs/design/ui/mocks/in-game-dossier*.png Dependencies: UI Scale setting (for absolute size); colonist systems below (for the data-backed tabs) Status: in progress (shell + Bio/Health/Memory/Tasks built; see PR #204)

Goal: Bring the in-game C++ ColonistDetailsDialog to full parity with the prototype. The dialog shell, persistent header, kicker/footer, 8-tab bar, and Bio/Health/Memory/Tasks layouts are built and match at the element level. Remaining:

Tasks:

  • Gear tab — prototype paper-doll built (branch dossier-gear-tabs): 3-column worn stubs + silhouette + real hand slots; weight-based pack with stacks; belt grid; carry meter
  • Bio traits as Badge chips (tone by good/bad/neutral)
  • Health tab renamed Needs (NeedsTabView); final tab order Bio/Needs/Skills/Social/Gear/Memory/Tasks/Log
  • Footer disabled treatment for Work Priorities + Draft (wiring still needs the underlying systems)
  • Text-overflow pass with a data-rich colonist (dev-verb populated); ASCII-only atlas fallbacks applied
  • Root-cause the rare first-open crash — concluded resolved by PR #254's Memory-LRU heap-corruption fix (15/15 clean first-opens under cdb; all dialog-side leads ruled out; see the 2026-07-03 investigation)
  • Tasks: richer current-task panel (type + target + nav state + distance + progress meter) once the data is surfaced
  • Memory: distance-from-colonist on entity rows; real Threats category when a threat system exists
  • Skills tab: real content when a skills/proficiency system exists (placeholder today)
  • Social tab: real content when relationships are tracked (placeholder today)
  • Log tab: real content when an activity/event log exists (placeholder today)
  • Footer: functional Work Priorities (needs the work-priorities system); Draft is live in EntityInfoView via direct control

Season System (season slider + dynamic seasonal snow)

Spec/Documentation: /docs/design/features/season-system.md (draft stub; background in docs/technical/cryosphere-ice-and-glaciers.md → "Season system") Dependencies: Cryosphere / ice (landed) Status: needs spec

Goal: Let the player view and select the time of year via a season slider, driven by real orbit mechanics (axial tilt + orbital position → per-tile insolation by date). Seasonal snow cover ("how much snow is on the ground right now") is DYNAMIC, computed at sim/view time from the date, NOT baked into worldgen — so changing the season must NOT require a full planet regeneration. Glaciers and the permanent-snow baseline stay in worldgen; seasonal snow is the thin, see-through layer on top of them.

Tasks:

  • Spec: orbit + axial-tilt model → per-tile insolation / temperature by date; how the date maps to the slider
  • Spec: dynamic seasonal snow (accumulate/melt from the date's temperature), separate from worldgen permanent snow + glaciers; where it lives (sim vs render), what is cached
  • Spec: how the globe and the 2D chunk views consume it without a planet regen
  • Season slider UI (view + select); recompute season without regenerating the planet
  • Seasonal snow render (the thin see-through layer the cryosphere doc defers)

✅ 2D Render Performance Overhaul (foundation, Phases 1-3 complete)

Spec/Documentation: .claude/plans/render-performance-overhaul.md, /docs/development-log/entries/2026-06-10-render-performance-overhaul.md Dependencies: None Status: core complete (Phases 1-3 landed 2026-06-10); Phases 4-5 parked as a small follow-up, not a blocker

Goal: Fix the measured collapse at zoom-out (4 FPS at 0.25x) and scroll hitches (112-443ms). Persistent GPU tile geometry, async entity bake, far-zoom impostor handoff. Target 120 FPS at every zoom at current flora density (headroom for massively increased density later); 4x density stress must hold 60+.

Foundation note: This epic established groundcover's two-representation contract: vector geometry up close, baked tile texture far away, with the impostor handoff between them at ~3px on-screen blade height. Living Environment Rendering builds directly on that contract.

Tasks:

  • Profiling tooling (camera/vsync control endpoints, perf-capture.ps1, draw call metrics fix)
  • Phase 1: Per-chunk tile-data textures (one quad per chunk; deleted per-frame drawTile path)
  • Phase 2: Async chunk generation + worker entity mesh bake + budgeted GPU uploads
  • Phase 3: Far-zoom impostor handoff (height-bucketed meshes, zoom cutoff + fade)
  • Windows frame pacing fix (timeBeginPeriod + sleep-then-spin; was capped ~60 FPS)
  • Phase 4: Remaining metrics correctness (GPU timer, Windows SystemResources, per-window max breakdown)
  • Phase 5: Small wins (AABB cache, LRU eviction, zoom-aware load radius, View smallest-pool, uniform-chunk fast path: skip the full 512x512 computeTile loop when all 4 sampled corners agree, e.g. deep-ocean chunks)
  • 4x-density scroll hitch attribution (p99 64ms at 4x; within criteria but worth chasing before density increase lands)

Living Environment Rendering

Spec/Documentation: .claude/plans/living-environment-rendering.md, .claude/plans/we-have-a-number-fuzzy-pearl.md (grass capacity + groundcover plan) Dependencies: 2D Render Performance Overhaul (Phases 1-3, complete) Status: in progress — Story 0 (render path) shipped in PR #238 (merged 2026-06-27); reactive animation (M-A onward) continues, split in Specboard as the "Living Environment: reactive flora & water" epic.

Goal: Wind-blown grass at scale (potentially hundreds of thousands of blades), grass parting around colonists with footprint trails, animated reactive water. Vertex-shader animation + interaction displacement maps; no per-frame CPU tessellation. Prerequisite surfaced 2026-06-26: grass currently renders through the static baked path, which cannot hold that density (memory + upload). A dense-flora render path (static GPU instancing) must land before wind.

Tasks:

  • Story 0: Groundcover asset class + dense flora render path — SHIPPED in PR #238 (merged 2026-06-27)
    • Restore grass visibility: grass biome coverage (was absent at the XericShrubland quickstart spawn)
    • AssetRole taxonomy (Groundcover vs WorldObject); grass moved to Groundcover_Grass + tagged groundcover; dead RenderingTier removed
    • Grass authored as a procedural Lua asset (grass.lua + XML params); all look/feel data-driven, hardcoded GroundcoverMesh deleted
    • Capacity spike: proven ~486k instanced tufts / 13.2M tris at 1.75ms / locked 120fps (RelWithDebInfo, dense BorealForest)
    • GPU-instanced groundcover render path: role-routed (skipped by the bake), buildMesh-per-seed variant meshes, position-hash variant buckets, tunable zoom LOD; verified in-game
    • Placement upright-rotation fix (opt-in <randomRotation>); EntityRenderer decomposed into per-path renderers; local 5-agent review + cleanup
  • M-A: WindSystem + vertex-shader wind for instanced and baked flora (depends on Story 0)
  • M-B: Interaction displacement map (trampling) + footprint persistence
  • M-C: Water ripple/foam/sparkle + interaction rings
  • M-D: Far-zoom wind sheen, tree sway, particles, blob shadows

✅ Task Ordering System

Spec/Documentation: /docs/design/game-systems/colonists/task-registry.md, .claude/plans/task-ordering-system.md Dependencies: Storage and Hauling System (complete) Status: complete

Goal: Global task prioritization where all colony tasks are computed with numerical priority (int16), each colonist filters/modifies priorities based on skills/preferences, and in-progress/follow-up tasks receive priority bonuses.

Tasks:

  • Phase 1: Config Infrastructure
    • Create assets/config/work/ folder structure
    • Implement ActionTypeRegistry (action-types.xml)
    • Implement TaskChainRegistry (task-chains.xml)
    • Implement WorkTypeRegistry (work-types.xml)
    • Implement PriorityConfig (priority-tuning.xml)
    • Implement ConfigValidator (fail-fast validation)
    • Unit tests for config loading and validation (19 tests)
  • Phase 1.5: Config Loading Integration
    • Add loadWorkConfigs() to GameLoadingScene::initializeWorldSystems()
    • Add ConfigError loading phase with error display
    • Update status text ("Loading configuration...")
    • Test reload cycle (menu → game → menu → game)
    • Refactor GameLoadingScene.cpp to remove m_ prefixes (coding standards)
  • Phase 2: Global Task Registry
    • Create GlobalTask struct (worldEntityKey, type, position, knownBy, reserved, chainId)
    • Implement GlobalTaskRegistry with memory-sourced tasks
    • Wire VisionSystem to notify registry on entity discovery
    • Implement reservation system with timeout
    • Spatial indexing for radius queries
    • Unit tests (10 tests passing)
  • Phase 3: Skills Component
    • Create Skills component with skill→level map
    • Add skill bonus calculation to priority formula
    • Wire skill requirements to work type filtering
  • Phase 4: Priority Scoring Integration
    • Add chainId, chainStep fields to Task component (moved from Phase 5)
    • Add priority bonus fields to EvaluatedOption (distance, chain, inProgress, taskAge)
    • Implement full priority formula using PriorityConfig
    • Wire AIDecisionSystem to use GlobalTaskRegistry for task age lookup
    • Add in-progress bonus for current task (+200)
    • Performance: TaskCache for O(1) registry lookup (batch query + hash map)
    • Note: GlobalTaskRegistry used for task age only; full integration (registry as task source) in Phase 5/6
  • Phase 5: Task Chaining
    • Add chain ID generation and assignment for Haul/PlacePackaged tasks
    • Implement chain continuation bonus (+2000) in AIDecisionSystem
    • Track chainStep progression in ActionSystem (phase transitions)
    • Handle chain interruption based on handsRequired (stow 1-hand, drop 2-hand)
    • Add 6 unit tests for chain scenarios
    • Note: "Refactor Haul to use Chain_PickupDeposit" deferred - current implementation works correctly with chainId/chainStep
  • Phase 6: Task List UI
    • Part A: Global Task List Panel (top-right, collapsible, all tasks)
      • GlobalTaskAdapter (ECS query layer)
      • GlobalTaskListModel (cache + 5Hz throttle)
      • GlobalTaskRow component (two-line display)
      • GlobalTaskListView (collapsible panel with scroll)
      • GameUI integration
    • Part B: Tasks Tab in Colonist Details Dialog
      • TasksTabView (scrollable task list for colonist)
      • ColonistDetailsModel.extractTasksData()
      • ColonistDetailsDialog integration (6th tab)

Related Specs:


UI Architecture: Animation System

Spec/Documentation: /docs/technical/ui-framework/animation-system.md (to be written) Dependencies: None Status: needs spec

Goal: Add tweening system for smooth UI transitions.

Background: The main-game-ui-design spec calls for smooth animations (modal fade-in, expand/collapse, toast slide-up). Currently no animation support.

Tasks:

  • Create Animator class
    • animate(float& value, target, duration, easing)
    • Per-frame update()
    • Common easing functions (linear, easeOut, easeInOut)
  • Integrate with Component lifecycle
    • Components can own Animator instance
    • Update called during update() phase
  • Demo animations
    • Fade in/out
    • Slide transitions
    • Progress bar value changes

✅ Main Game UI: Primitives Foundation

Spec/Documentation: /docs/design/main-game-ui-design.md (Section 17) Dependencies: UI Architecture: Layout System (complete) Status: complete

Goal: Complete scroll container and generalize progress bar for reuse across UI.

Completed Tasks:

  • ProgressBar Component (libs/ui/components/progress/)
    • Generic progress bar with normalized 0-1 value
    • Configurable fill color (not value-based gradient)
    • Optional label support (label left, bar right)
    • 10 unit tests covering construction, value clamping, positioning
  • NeedBar Refactor
    • NeedBar now wraps ProgressBar internally
    • API unchanged (0-100 scale, valueToColor gradient)
    • Visual appearance identical
  • ScrollContainer Component (libs/ui/components/scroll/)
    • Encapsulates scroll logic (content height, viewport, scroll bounds)
    • Mouse wheel event handling
    • Scrollbar visuals (track + thumb using Theme colors)
    • Scrollbar thumb dragging
    • Click track to jump to position
    • Auto content height detection from LayoutContainer child
    • 15 unit tests covering construction, scroll bounds, position, viewport resize, hit testing
  • ScrollScene Demo in ui-sandbox
    • Basic scrollable list
    • Scrollable button list with LayoutContainer
    • ProgressBar showcase with different colors

Result: Generic progress bars and scrollable containers available in libs/ui/ for reuse across all UI. NeedBar simplified to thin wrapper. ✅


✅ Main Game UI: Interaction Components

Spec/Documentation: /docs/design/main-game-ui-design.md (Sections 8, 14, 17) Dependencies: Main Game UI: Primitives Foundation (complete) Status: complete

Goal: Build dialog, tooltip, and context menu systems.

Completed Tasks:

  • Dialog Component
    • Full-screen semi-transparent overlay
    • Centered content panel with title bar
    • Close via [X] button, Escape, or outside click
    • Fade in/out animation
    • Focus scope for keyboard capture
    • Unit tests (18)
  • Tooltip System
    • TooltipManager singleton for global coordination
    • 0.5s hover delay (Theme.Tooltip.hoverDelay)
    • Smart positioning (stay on screen)
    • Fade in/out animation
    • Content: title, description, hotkey
    • Unit tests (19: 9 Tooltip + 10 TooltipManager)
  • Context Menu Component
    • Right-click popup menu
    • Menu items with enabled/disabled state
    • Keyboard navigation (Up/Down/Enter/Escape)
    • Click-outside-to-close
    • Screen edge clamping
    • Unit tests (17)

Result: All interaction components implemented with minimal APIs, theme-based styling, and comprehensive test coverage (54 new tests). Components use FocusableBase for keyboard handling. ✅


✅ Main Game UI: Information Systems

Spec/Documentation: /docs/design/main-game-ui-design.md (Sections 4, 6) Dependencies: Main Game UI: Complex Components, UI Architecture: ViewModel Pattern Status: complete

Goal: Add resources panel and notifications to the game UI.

Completed Tasks:

  • Resources Panel
    • Collapsed: [Storage ▼] button
    • Expanded: Empty state message (stockpiles not yet implemented)
    • Position below zoom controls in top-right
    • Uses Component pattern with addChild for layering
  • Notifications System
    • ToastStack integration in GameUI
    • Position bottom-right, above gameplay bar
    • Click-to-navigate callback support (onClick)
    • pushNotification() API on GameUI
    • Deleted old NotificationManager (replaced by ToastStack)
  • Z-Order Fix
    • Remove explicit zIndex from TopBar/GameplayBar backgrounds
    • Use insertion order for parent/child layering

Deferred:

  • Resources Panel TreeView population (requires stockpile system)
  • Pin-to-always-show functionality

Result: Notification toasts appear in bottom-right with click-to-navigate. Resources panel shows collapsible "Storage" button with empty state. Z-order rendering fixed across all bars. ✅


Main Game UI: Minimap

Spec/Documentation: /docs/design/main-game-ui-design.md (Section 3) Dependencies: Main Game UI: Information Systems Status: planned

Goal: Add minimap for world overview and navigation.

Tasks:

  • Panel shell: RegionMinimapPanel first in the right stack (256 m window on the crash site, grid, coord label) — Game UI to Prototype Polish epic
  • Colonist dots + off-map bearing chevrons
  • Camera viewport rectangle overlay
  • Minimap Rendering
    • Render-to-texture world overview
    • Terrain colors by surface type
    • Building indicators
    • Threat indicators (red)
  • Minimap Interaction
    • Click to navigate camera
    • Minimap zoom controls (+/-)

Notes: Deferred from Information Systems epic due to GPU complexity. May require significant render-to-texture optimization work.


Main Game UI: Management Screens

Spec/Documentation: /docs/design/main-game-ui-design.md (Section 11) Dependencies: Main Game UI: Interaction Components (Modal), UI Architecture: ViewModel Pattern Status: planned

Goal: Full-screen management overlays.

Tasks:

  • Work Priorities Screen (W key)
    • Grid: colonists × work types
    • Priority 1-4 or disabled (—)
    • Click to cycle, right-click to disable
  • Schedule Screen (S key)
    • Hour-by-hour grid (0-23)
    • Block types: Sleep, Work, Recreation, Anything
    • Drag to paint time blocks
  • Research Screen
    • Tech tree visualization with dependencies
    • Current research progress bar
  • History/Log Screen (H key)
    • Scrollable event log
    • Timestamped entries
    • Filter by category

Main Game UI: Polish & worldsim Features

Spec/Documentation: /docs/design/main-game-ui-design.md (Sections 12, 14, 16) Dependencies: Most other Main Game UI epics Status: planned

Goal: Final polish and worldsim-unique visualization features.

Tasks:

  • Camera & Selection
    • Location bookmarks (Shift+1-9 to set, 1-9 to jump)
    • Box selection, Shift/Ctrl-click multi-select
    • Backspace to return to previous location
  • Tooltips Throughout
    • Add tooltips to all interactive elements
  • Memory Visualization Mode (M key when colonist selected)
    • Overlay: bright = entities colonist knows, dim = unknown
  • World-Space UI
    • Selection indicators (white outline)
    • Colonist labels toggle (L key)
    • Threat indicators (red pulsing circles)
    • Off-screen threat direction arrows

Vision System: Occlusion & Discovery

Spec/Documentation: /docs/technical/vision-architecture.md Dependencies: Geometry Foundations (libs/geometry); consumes Building & Construction's structure publication for occluders Status: complete — shipped #172/#173/#179/#183/#184, landed just before Navigation P4's belief filtering (its honest write path into memory). See dev log 2026-06-18-vision-system.md

Goal: Honest sight: GeometryIndex shared with navigation, visibility polygons with an outdoor fast path, discovery/witnessing/stale-memory reconciliation through visibility, windows pass sight while blocking movement, structures discoverable per segment. Must land with or before Navigation P4 (belief filtering is hollow without it). Fog of war explicitly excluded — separate later epic alongside the overlay system; the polygon data it needs comes free from this work.

Tasks:

  • GeometryIndex (segment store + transparency flags + version counter, shared with nav obstacle publication)
  • Visibility polygons (rotational sweep, outdoor fast path, per-observer caching)
  • Rewire discovery, witnessing, and stale-memory reconciliation through visibility
  • Structure-as-observable discovery + window transparency

Navigation & Pathfinding

Spec/Documentation: /docs/technical/pathfinding-architecture.md Dependencies: Geometry Foundations (shared integer-coordinate substrate, libs/geometry); consumes the construction obstacle/portal contract Status: in progress — navigation v1 shipped (P1, P2); belief filtering complete (P4, #189/#191/#194); regional layer complete (P3, 2026-06-23); P5/P6 remain. See dev logs 2026-06-16-navigation-v1.md, 2026-06-19-navigation-belief-filtering.md, and 2026-06-23-navigation-p3-regional-layer.md

Goal: Four-tier vector-native navigation: planet hex graph for cross-globe abstract parties, chunk connectivity components for reachability, dynamic CDT navmesh for exact local paths, collision circles + velocity-obstacle steering so agents take up space. Must land (through P4) before walls ship as player-facing gameplay; P6 unlocks raids.

Tasks:

  • P1: Agents become physical (radius component, dynamic spatial hash, circle collision, separation)
  • P2: Local navmesh, static world (exact CDT over the loaded area from terrain/water/flora/wall contours, triangle A* + corridor width + funnel, waypoint following). Shipped as one merged loaded-area mesh, off-thread rebuild on world change; integrated into MovementSystem + AIDecisionSystem; NavOverlay debug draw.
  • P3: Regional layer — DONE (2026-06-23). Width-aware reachability over the merged navmesh: connected components + Kruskal max-spanning reconstruction tree giving bottleneck(a,b) by LCA, in a truth forest (goal validity) and a terrain forest (belief-sound reject); the cheap reject (diameter > bottleneck, or different component) short-circuits the A* so failed searches vanish. Un-deferred Demyen corridor-width filtering (any agent size), grid point location, RRA* heuristic on the terrain graph (one resumable reverse search per goal serves every agent), A* instrumentation. Articulated narrow-cross-section routing model settled. Deferred: belief-dependent wall clearance, local dirty-section invalidation, NavOverlay/HTTP stats surface.
  • P4: Dynamic world + belief — DONE. Static slice (construction obstacles/portals, water, tree footprints, wall-collision safety net) plus belief filtering: one full-triangulation navmesh with per-face blocker tags, a per-colonist BeliefFilter consulted at query time (unseen walls treated as absent), beliefVersion-driven replans coalesced against vision, and nav-state readability in the colonist panel ("Going to" / "Re-routing" / "Can't find a way to"). Deferred: active search behaviors (door-discovery wall-follow, LKP search — NavState reserves their labels) and stale-demolished-wall pessimism.
  • P5: Crowds (velocity-obstacle avoidance + mitigations, occupancy costs, door slot queues, regression rig)
  • P6: Global tier + raids (hex-graph A*, abstract party records, attention bubbles, materialization handoffs, raider belief seeding + scouting)
  • Optional polish: brighter debug overlay, waypoint substepping for fast movers (nav-state line in colonist info panel DONE #194)

Simulation-Area Navigation LOD + Per-Asset Collision Geometry

Spec/Documentation: /docs/technical/vector-graphics/collision-shapes.md, /docs/technical/pathfinding-architecture.md, /docs/development-log/entries/2026-06-24-sim-area-nav-lod-and-collision-geometry.md Dependencies: Navigation & Pathfinding (P3 regional layer) Status: complete (A-G + F + D2 shipped: #217, #220, #221, #225, #226, #227)

Why: nav-v1 never built the navmesh in a forested world (every loaded tree carved into one ~88k-poly mesh; the off-thread build never finished, colonists beelined). Fixed architecturally with a viewport-anchored simulation-area LOD; the long-specced per-asset collision geometry landed alongside.

Tasks:

  • A/B/C: Simulation-area nav LOD — viewport-anchored navmesh build (forested world builds <1s), pan/zoom tracking (capped 64m, rebuild on in-area placement), off-area beeline seam (#217)
  • D1: Rect collision primitive — drop Circle; rect-or-polygon; XML <rect> + Lua asset:setCollisionRect (eager capture at load); trees emit trunk rects (#220)
  • E: Tier-3 static-rect collision — StaticRectCollisionSystem pushes agents out of trunk rects at the nav-pad clearance (#221)
  • G: Asset-manager collision overlay + larger preview (#225)
  • F: Spec → Implemented + dev-log + flora-skill collision docs
  • D2: SVG-metadata collision authoring + BigRock obstacle (simple assets author the collider in SVG <metadata>) (#227)
  • Follow-ups (filed): visual-size obstacle LOD (lift the 64m cap); unify procedural collider frame; coarse far-field nav layer (LOD1)

Flora Content Pack

Spec/Documentation: /docs/technical/asset-system/ Dependencies: Simple Asset Support (complete) Status: ready

Goal: Add visual variety with flowers, mushrooms, rocks, and bushes.


Variant Cache System

Spec/Documentation: /docs/technical/asset-system/README.md (World Seed section) Dependencies: Folder-Based Asset Migration Status: planned

Goal: Pre-generate and cache procedural asset variants for fast loading.


Observability System - Full Feature Set

Spec/Documentation: /docs/technical/observability/INDEX.md Dependencies: None Status: planned


GPU-Based SDF Rendering for UI Primitives

Spec/Documentation: /docs/technical/ui-framework/sdf-rendering.md Dependencies: None Status: planned


Mod Support

Spec/Documentation: /docs/technical/asset-system/mod-metadata.md, /docs/technical/asset-system/patching-system.md Dependencies: Folder-Based Asset Migration, Variant Cache System Status: planned (post-MVP)


Blockers & Issues

Known limitations — chained build loop (non-blocking)

From the realistic-harvest work (dev log 2026-06-20-carry-weight-axe-gated-harvest.md):

  • Multi-colonist carry accounting is coarse. ConstructionSystem::carriedAmount sums Wood across all colonists, while the per-trip bound is a single colonist's. Fine for the single-cutter case; revisit when balancing load across colonists.
  • Dev/tool-placed entities don't survive chunk unload. If a colonist roams far with no work and the origin chunks unload, dev-spawned trees and committed foundations are lost, leaving the colonist idle. World-gen flora regenerate on chunk reload, so this is mainly a dev-test artifact; a colonist with genuinely no reachable work also wanders far (cosmetic).
  • Builds are slow-ish. ~30s of a colonist standing in place for a 36 m² foundation at normal speed (work scales 12 units/m²). Now legible via the percent + on-map fill; lower workRatePerSquareMeter if a snappier feel is wanted (balance dial, not a bug).
  • "Next" chain step verified live only for the construction chain. Craft/storage chains are handled in code (destination classification) but not yet exercised live.

✅ RESOLVED: SVG Ellipse/Circle Tessellation Bug

Impact: Berry Bush and other assets using <ellipse> or <circle> SVG elements fail to render Resolution: Fixed in commit e246fc0 (Dec 7, 2025) by adding convex polygon detection + fan tessellation

  • Added isConvexPolygon() to detect circles/ellipses (inherently convex)
  • Convex polygons use O(n) fan tessellation, bypassing the problematic ear-clipping algorithm
  • Unit tests added in Tessellator.test.cpp to prevent regression
  • Berry Bush SVG now renders correctly with native <circle> elements

✅ RESOLVED: Entities Spawning on Water Tiles

Impact: Flora entities (grass, berry bushes, trees) spawn on water tiles instead of being restricted to land Resolution: Fixed by Flat Tile Storage Refactor + Retina Coordinate Fix

  • Flat tile storage gives single source of truth for surface type
  • Retina coordinate fix ensures correct world↔screen mapping
  • Colonists now correctly find and drink from actual water tiles
  • No visual grass-on-water issue observed

MVP Success Criteria

From /docs/design/mvp-scope.md:

Test Scenario:

  1. One colonist spawns at map center
  2. Several berry bushes scattered nearby
  3. Water tiles (ponds) within walking distance (tile-based, not entity)
  4. Open ground for sleeping/bathroom

Expected Behavior (leave running):

  1. Colonist wanders initially
  2. Discovers berry bush and pond through sight
  3. When hungry → walks to known berry bush → eats
  4. When thirsty → walks to known pond → drinks
  5. Drinking increases bladder need
  6. When bladder urgent → finds outdoor spot → creates Bio Pile
  7. When tired → sleeps on ground
  8. Repeat forever

Success:

  • Colonist survives indefinitely
  • Task queue shows sensible decisions
  • No player intervention required
  • Colonist discovers new entities through wandering