From 2a360af22a614a40e981bfbd1f03315956448001 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 26 Jun 2026 15:20:17 -0400 Subject: [PATCH] =?UTF-8?q?docs(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=97=82=EF=B8=8F=20p3-26=20full=20migration=20backlog=20+?= =?UTF-8?q?=20p3-27=20biosphere-headless=20objective?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recorded the verified live-turn-vs-headless migration sweep: - p3-26: full backlog B1-B8 (happiness/golden-age, healing, improvements-tick, government, loot-decay, equipment, per-building-queues, remaining 9 event categories) — each grepped to 0 hits in mc-turn. - p3-27 (new): biosphere headless port — ecology population tick + flora succession + marine ecology (the bio simulators exist as crates + tick in the live game but not the headless turn); underlies the plague/pandemic/marine events. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../p3-26-complete-headless-simulator.md | 22 +++++++++++ .../objectives/p3-27-biosphere-headless.md | 39 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .project/objectives/p3-27-biosphere-headless.md diff --git a/.project/objectives/p3-26-complete-headless-simulator.md b/.project/objectives/p3-26-complete-headless-simulator.md index 1ecb22b3..587654dd 100644 --- a/.project/objectives/p3-26-complete-headless-simulator.md +++ b/.project/objectives/p3-26-complete-headless-simulator.md @@ -56,3 +56,25 @@ climate → events (depends on climate triggers) → equipment → per-building lands in bounded increments with cargo + the headless e2e (`process_*` tests + `magic_civ_view`) green. Reference impls in `@magic-civilization.messy/` per [[atomic-porting]] rules. Related: [[p3-25 ...]] (the dual city model underlies gaps 1+4). + +## Full migration backlog (verified 2026-06-26 — live turn pipeline vs headless mc-turn step) + +Diffed `turn_processor.gd`/`turn_manager.gd` (live per-turn calls) against `mc-turn::step` +(`grep` confirmed `0 hits` for each "missing" subsystem). **Done in headless:** trade, +economy, city-production+growth, culture+border, tech/science, fauna *encounters*, +PvP/siege/lair combat, climate physics+weather+effects, 3 event categories. + +**Backlog (live-only → migrate into `mc-turn`):** +- [ ] **B1 Happiness + Golden Age** — `mc-happiness` exists; tick per-turn (golden-age meter, anarchy). +- [ ] **B2 Unit + city healing** — HP regen (in-territory / fortified / city heal). +- [ ] **B3 Improvements build tick** — `_process_improvements` (build progress, not just yields). +- [ ] **B4 Government/civics per-turn** — `mc-civics`; (disabled in live too — stub). +- [ ] **B5 Loot decay** — `mc-city` items; (disabled in live too). +- [ ] **B6 Equipment/crafting** — `mc-city/recipes.rs`; add headless Craft action + tick (was gap 3). +- [ ] **B7 Per-building queues** — dual-city-model unification (was gap 4). +- [ ] **B8 Remaining 9 event categories** — impact/seismic/tsunami/plague/pandemic/marine/solar/glacial (+magical→G3); some need solar_forcing/glacial_forcing physics consumption (was gap 2 tail). +- [ ] **Biosphere cluster → see [[p3-27 ...]]** (ecology population + flora succession + marine). + +Sequencing: B1/B2/B3 (self-contained turn-glue) parallelizable as separate modules; B6/B7 +ride the dual-city-model; B8 ecological/marine events depend on p3-27. Each lands +cargo+test-green, wired into `step()` serially. diff --git a/.project/objectives/p3-27-biosphere-headless.md b/.project/objectives/p3-27-biosphere-headless.md new file mode 100644 index 00000000..4de8fe36 --- /dev/null +++ b/.project/objectives/p3-27-biosphere-headless.md @@ -0,0 +1,39 @@ +--- +id: p3-27 +title: Biosphere in the headless sim — ecology population + flora succession + marine ecology +priority: p3 +scope: game1 +owner: warcouncil +status: open +updated_at: 2026-06-26 +--- + +## Summary + +Split from [[p3-26-complete-headless-simulator]]. The biological simulators exist as full +Rust crates — `mc-ecology` (`EcologyEngine`: per-tile fauna populations, predator/prey, +evolution) and `mc-flora` (`FloraEngine`: per-tile vegetation + succession) — and the LIVE +game ticks them every turn (`EcologyState.tick` + `take_flora_transitions`, +turn_manager.gd:315). But the **headless `mc-turn` step does NOT tick them** (verified: `0 +hits` for EcologyEngine/FloraEngine/flora in `processor.rs`). Only fauna *encounters* +(combat) run headless. So the headless sim has no living biosphere for events/economy to +interact with. + +## Acceptance + +- [ ] **Ecology population tick** in `mc-turn` — drive `mc-ecology::EcologyEngine` per turn + on `state.grid` (fauna populations, Lotka-Volterra), matching the live `EcologyState.tick`. +- [ ] **Flora succession tick** — drive `mc-flora::FloraEngine` per turn (vegetation + growth/decline, succession transitions). +- [ ] **Marine ecology** — port `marine_harvest.gd` (372 lines: fish-stock depletion/ + recovery, coral-reef bleaching, `ocean_dead_fraction` → climate) into Rust + tick it. +- [ ] **Bio-targeting events enabled** — once populations live headless, implement the + ecological/marine event categories (plague, pandemic, marine) that damage them (p3-26 B8). +- [ ] Deterministic from seed; cargo + headless e2e green. + +## Notes + +Created 2026-06-26. Needs grid fields for fauna/flora populations + fish_stock/reef to +persist on `state.grid` (or a parallel store) so a fresh per-turn processor operates on +persistent biosphere state — same pattern as climate state on the grid. Underlies the +plague/pandemic/marine events.