docs(@projects/@magic-civilization): 🗂️ p3-26 full migration backlog + p3-27 biosphere-headless objective

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) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-26 15:20:17 -04:00
parent e4a3808a19
commit 2a360af22a
2 changed files with 61 additions and 0 deletions

View file

@ -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.

View file

@ -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.