From cbe254a936fd98d29e2f962ed348d5b519ea4b02 Mon Sep 17 00:00:00 2001 From: dingo Date: Thu, 8 Oct 2026 12:10:10 -0400 Subject: [PATCH] updating docs --- docs/INITIAL_BRIEF.md | 2606 ---------------------------------------- docs/OpenAI_ChatLog.md | 830 ------------- 2 files changed, 3436 deletions(-) delete mode 100644 docs/INITIAL_BRIEF.md delete mode 100644 docs/OpenAI_ChatLog.md diff --git a/docs/INITIAL_BRIEF.md b/docs/INITIAL_BRIEF.md deleted file mode 100644 index 536e59e..0000000 --- a/docs/INITIAL_BRIEF.md +++ /dev/null @@ -1,2606 +0,0 @@ -AETERNALIS EVOLUTION - -Master Engineering, Architecture, Infrastructure, and Game-System Brief - -You are acting as a principal software architect, senior C++ engineer, distributed-systems engineer, simulation engineer, game-engine engineer, DevOps/platform engineer, and technical project planner for a new persistent online evolutionary simulation game. - -Your immediate responsibility is not to blindly generate the entire game. - -Your responsibility is to: - -1. Understand and preserve the design vision below. -2. Turn it into rigorous technical architecture. -3. Identify unknowns and risks. -4. Produce Architecture Decision Records (ADRs). -5. Establish engineering standards. -6. Design repository/module boundaries. -7. Design the simulation model. -8. Design the networking model. -9. Design persistent-world infrastructure. -10. Design Kubernetes deployment architecture. -11. Produce an incremental milestone roadmap. -12. Scaffold the repository. -13. Create tests and development tooling. -14. Begin implementing the smallest foundational vertical slice. -15. Never compromise the long-term architecture merely to produce a quick demonstration. - -The project is intended to evolve from a development deployment on a single Dell PowerEdge R730xd Kubernetes host with approximately 128 GB RAM into a horizontally scalable production deployment by adding physical servers, processors, RAM, storage, and eventually additional Kubernetes clusters. - -Production scale is not required immediately. - -Production-shaped architecture is required immediately. - -⸻ - -1. CORE GAME CONCEPT - -This is a persistent MMO evolution game. - -Players begin each life as a primitive single-celled organism. - -The earliest gameplay is a 2D microscopic environment. - -The player must: - -* move, -* find energy/resources, -* consume matter or other organisms, -* avoid predators, -* reproduce, -* select evolutionary mutations, -* adapt to changing environmental conditions, -* and eventually potentially become multicellular. - -Evolution is the central character-development mechanic. - -There are no conventional RPG classes. - -There should not be a conventional linear skill tree. - -There should not be a predetermined progression such as: - -Cell → Fish → Reptile → Mammal → Human. - -Evolution must branch organically. - -Possible evolutionary strategies include, but are not limited to: - -* predation, -* scavenging, -* photosynthesis, -* chemosynthesis, -* parasitism, -* symbiosis, -* decomposition, -* sessile organisms, -* plants or plant-like organisms, -* fungi or fungus-like organisms, -* motile animal-like organisms, -* colonial organisms, -* enormous multicellular organisms, -* highly intelligent organisms, -* minimally intelligent but extremely successful organisms. - -“Animal,” “plant,” and “fungus” should preferably be emergent classifications, not hard-coded character classes. - -The simulation should allow organisms that do not fit real-world classifications cleanly. - -Examples: - -* photosynthetic mobile organisms, -* carnivorous plants, -* colonial superorganisms, -* mineral-consuming organisms, -* organisms using exotic but internally consistent metabolic strategies. - -⸻ - -2. PERMADEATH - -Permadeath is absolute. - -When the player-controlled organism dies: - -that organism is permanently dead. - -The player begins again as a new primitive single-celled organism. - -There are: - -* no resurrection mechanics, -* no corpse retrieval, -* no retained stat bonuses, -* no inherited power, -* no level checkpoints, -* no skipping the cellular stage merely because the player has reached later stages previously. - -Death should matter. - -The player may retain account-level historical information such as discoveries, statistics, lineage history, or a codex, but nothing that makes the next organism biologically stronger simply because the account is old. - -The world persists. - -The character does not. - -⸻ - -3. PERSISTENT LINEAGES - -Player-created organisms can reproduce. - -Reproduction creates descendants. - -A fundamental design under consideration is: - -Every player reproduction can seed one or more autonomous NPC descendants derived from the player’s current genome. - -The exact offspring count may eventually depend on reproductive strategy. - -Examples: - -Binary fission: - -* one descendant per reproductive event. - -Egg production: - -* potentially many offspring, -* high juvenile mortality, -* substantial energetic investment. - -Live birth: - -* fewer offspring, -* higher investment per offspring. - -Spore/broadcast reproduction: - -* potentially huge theoretical offspring counts, -* mostly represented statistically rather than instantiated as individual AI entities. - -NPC descendants are not owned by the player. - -They are wildlife. - -They continue existing after the player logs out or dies. - -The player may later encounter descendants from an earlier life. - -A later lineage created by the same player may even compete against or drive an older lineage extinct. - -⸻ - -4. OFFLINE PLAYERS - -Offline player-controlled organisms MUST NOT continue progressing. - -Logging out must not allow: - -* movement, -* feeding, -* reproduction, -* mutation, -* growth, -* passive progression. - -The exact logout treatment still requires design. - -Potential approaches include: - -* safely removing the player-controlled organism from active simulation, -* placing it in a non-progressing dormant state, -* another mechanism that preserves fairness. - -NPC descendants remain part of the ecosystem independently. - -⸻ - -5. NO PLAYER/NPC VISUAL DISTINCTION - -The game should not show arbitrary UI labels identifying: - -* player, -* NPC, -* level, -* species ownership. - -Players and NPC descendants should visually obey the same biological rules. - -Friends may be identifiable through a separate social mechanism. - -An organism’s behavior may make a human-controlled organism seem unusually intelligent, but there should not be a floating: - -PLAYER - -or: - -NPC - -tag above organisms. - -⸻ - -6. EVOLUTIONARY FAILURE AND NATURAL SELECTION - -When a player dies, existing descendants do not simply disappear. - -The cause of death demonstrates weaknesses in the player’s current evolutionary strategy. - -Examples: - -A high-metabolism lineage dies of starvation. - -Its descendants continue possessing that high metabolic demand and are therefore statistically more vulnerable to starvation. - -A lineage with poor toxin resistance dies from poison. - -Its descendants remain vulnerable unless mutation/divergence has occurred. - -A predator kills the player. - -That predator should also be capable of preying upon genetically similar descendants. - -Lineages should disappear because ecological pressures make them unsuccessful, not because the system arbitrarily removes them. - -⸻ - -7. THE WORLD SHOULD BEGIN BIOLOGICALLY EMPTY - -A new world/server may begin as a lifeless planet containing: - -* water, -* minerals, -* atmosphere, -* geological structures, -* energy sources, -* sunlight/starlight, -* chemistry, -* temperature gradients, -* hydrothermal or chemical energy sources. - -There need not initially be: - -* grass, -* trees, -* fish, -* plankton, -* deer, -* arbitrary NPC life. - -The long-term goal is: - -Every living lineage in the persistent world can ultimately trace its ancestry to organisms originally influenced or created by players. - -A forest existing years after server creation may descend from a lineage originally created by a player during the world’s earliest history. - -The game’s persistent “character” is effectively the world’s evolutionary history. - -⸻ - -8. ENERGY IS THE FUNDAMENTAL ECONOMY - -Avoid arbitrary RPG balancing wherever possible. - -Evolutionary advantages should cost something physically or biologically. - -Examples: - -More muscle: - -* increased force, -* greater resource consumption, -* increased oxygen requirement, -* increased mass. - -Armor: - -* increased protection, -* added mass, -* construction cost, -* possibly decreased mobility. - -Large brain: - -* increased behavioral capability, -* major metabolic cost. - -Flight: - -* mobility, -* escape advantages, -* enormous structural and energy requirements. - -Venom: - -* offensive benefit, -* biochemical production cost. - -Large body: - -* durability and predation advantages, -* major food requirements, -* slower reproduction. - -The biological economy should be dominated by: - -* energy, -* matter, -* nutrients, -* environmental constraints. - -The goal is for a large creature to be powerful only if the ecosystem can actually support it. - -⸻ - -9. 2D AND 3D SIMULATION DOMAINS - -The microscopic cellular phase will likely use a 2D simulation. - -The macroscopic multicellular phase will use a 3D simulation. - -These domains should NOT attempt to maintain direct physical one-to-one interaction across radically different scales. - -Instead, connect them ecologically. - -Example: - -Millions of microscopic photosynthetic organisms: - -micro-simulation population -→ aggregated plankton biomass -→ represented as food/resource density in the 3D ocean. - -A massive 3D organism dies: - -corpse biomass -→ decomposition/nutrients -→ affects microbial population models in the microscopic simulation. - -Thus: - -2D and 3D do not share literal physics. - -They share: - -* energy, -* nutrients, -* biomass, -* atmosphere, -* hydrology, -* ecology. - -The exact multicellular transition rules must be designed. - -⸻ - -10. VOXEL PLANET - -The macroscopic world should use a voxel-based planetary structure. - -The voxel system should ultimately allow the planet to be physically modified deep beneath the surface and potentially to its core. - -The intent is NOT a simplistic Minecraft cube aesthetic. - -Voxels are primarily the data representation. - -Visible terrain should eventually be reconstructed as smooth geometry using an appropriate surface extraction system such as: - -* Marching Cubes, -* Surface Nets, -* Dual Contouring, -* another justified algorithm. - -Do not commit to one algorithm without an ADR and prototype comparison. - -The world should be sparse and multi-resolution. - -Never allocate every voxel of the entire planet explicitly. - -Potential hierarchy: - -Planet -→ planetary cells -→ regions -→ chunks -→ active voxel data. - -Potential detail hierarchy: - -planetary simulation: -kilometer-scale aggregate cells - -regional simulation: -tens-of-meters scale - -active terrain: -meter-scale voxels - -fine interaction: -sub-meter generated/derived detail where necessary. - -Resolution should follow simulation relevance. - -⸻ - -11. PROCEDURAL BASE WORLD + PERSISTED MODIFICATIONS - -The world should have a deterministic procedural base. - -Example: - -Planet seed -+ -geological generation rules - -base terrain. - -Unmodified regions/chunks should be reproducible. - -Persistent storage should primarily contain: - -* world seed, -* geological state where required, -* modified chunks, -* voxel deltas, -* ecological/environmental changes, -* compacted snapshots. - -Conceptually: - -base generated chunk -+ -modification journal - -current chunk. - -Modification journals should periodically compact into new snapshots. - -⸻ - -12. VOXELS ARE ENVIRONMENTAL DATA - -A voxel should eventually be capable of representing more than “stone” or “dirt.” - -Potential properties include: - -* material identifier, -* density, -* temperature, -* moisture, -* water saturation, -* oxygen, -* carbon, -* nitrogen, -* phosphorus, -* salinity, -* organic matter, -* hardness, -* thermal conductivity, -* specific heat, -* chemical composition. - -DO NOT naïvely store dozens of 32-bit floats per voxel across the entire planet. - -Design data-oriented compact representations. - -Different voxel/material types may have different relevant fields. - -Far-away regions should use aggregate values rather than explicit high-resolution chemistry. - -⸻ - -13. BIOLOGY ↔ TERRAIN INTERACTION - -The environment must participate in biological simulation. - -Examples: - -Plants: - -* roots extract water/nutrients, -* photosynthetic surfaces capture light, -* canopies shade competitors, -* growth changes physical terrain. - -Burrowing organisms: - -* remove/displace matter, -* aerate soil, -* form caves/tunnels. - -Dead organisms: - -* become biomass, -* decompose, -* feed scavengers, -* return nutrients. - -Large herds: - -* consume vegetation, -* compact terrain, -* distribute nutrients. - -Long-lived ecosystems can gradually alter: - -* soil, -* atmosphere, -* water chemistry, -* erosion, -* sedimentation. - -The goal is eventually to allow biology to affect geology and geology to affect biology. - -⸻ - -14. GENOTYPE, DEVELOPMENT, PHENOTYPE - -These MUST be separate concepts. - -Pipeline: - -GENOTYPE -→ DEVELOPMENT -→ PHENOTYPE -→ PHYSICAL/BIOLOGICAL SIMULATION -→ FITNESS/REPRODUCTIVE SUCCESS. - -The genome describes developmental capabilities and parameters. - -Do not simulate literal real DNA. - -Instead implement an evolvable developmental genome suitable for gameplay. - -Possible categories: - -* metabolism, -* cellular structures, -* membrane, -* tissues, -* reproduction, -* digestion, -* sensory systems, -* locomotion, -* nervous systems, -* structural systems, -* immune/defensive systems, -* environmental tolerances, -* photosynthesis/chemosynthesis, -* morphology, -* growth, -* symmetry, -* organs. - -⸻ - -15. TRAITS MUST ALTER PHYSICAL/BIOLOGICAL PARAMETERS - -Avoid conventional effects like: - -+25 HP -+10% damage - -whenever possible. - -Prefer effects such as: - -skin thickness +2mm -muscle cross-sectional area increases -membrane rigidity changes -oxygen affinity changes -metabolic efficiency changes -enzyme temperature optimum changes. - -Derived systems then determine gameplay consequences. - -One mutation should potentially affect many systems. - -Example: - -Thicker armor: -→ added mass -→ increased protection -→ increased developmental material cost -→ increased movement cost -→ heat retention changes. - -This creates meaningful evolutionary tradeoffs. - -⸻ - -16. MUTATION GENERATION - -Mutation options should not be a static visible RPG tree. - -Candidate mutations may depend on: - -* current genome, -* phenotype, -* previous mutations, -* environmental conditions, -* player behavior, -* consumed resources, -* ecological pressures, -* developmental prerequisites. - -Concept: - -Current Genome -+ -Behavior -+ -Environmental Pressure -+ -Available Developmental Paths - -Candidate Mutations. - -Players should learn biological principles, not memorize a single guaranteed build order. - -The mutation system must remain deterministic/testable enough that it can be debugged. - -Randomness should use explicit seeded random generators. - -⸻ - -17. MULTICELLULAR MORPHOLOGY - -The eventual 3D creature creator should be conceptually similar to the freedom of Spore’s creature creator, but constrained by evolved biology. - -Players do not receive arbitrary body parts. - -They may manipulate structures their genome can actually develop. - -The underlying representation should probably be a body/development graph rather than just a mesh. - -Possible model: - -BodyGraph - -* nodes: - * tissue structures, - * body segments, - * organs, - * limbs, - * sensory structures, - * roots, - * leaves, - * reproductive organs. -* edges: - * anatomical attachment, - * joints, - * vascular connections, - * neural connections, - * developmental dependencies. - -The rendering system derives meshes from the phenotype. - -The physics system derives collision/mass structures. - -The locomotion system derives possible movement. - -The metabolic system derives maintenance costs. - -The damage system derives vulnerable structures. - -⸻ - -18. PROCEDURAL ANIMATION - -Because arbitrary evolved morphologies cannot rely on hand-authored animations, procedural locomotion must eventually exist. - -Possible systems: - -* inverse kinematics, -* procedural gait generation, -* center-of-mass control, -* foot placement, -* limb phase calculation, -* swimming propulsion, -* crawling, -* slithering, -* flying. - -A creature losing a limb should potentially cause its procedural movement system to compensate rather than merely playing a pre-authored animation. - -This is a later-stage R&D system and should NOT block the early cellular simulator. - -⸻ - -19. CUSTOM ENGINE REQUIREMENT - -DO NOT use: - -* Unreal Engine, -* Unity. - -The project will use a custom game/simulation engine. - -Do not build every low-level primitive unnecessarily. - -Using specialized libraries is allowed and encouraged where they provide clear value. - -Candidate technologies must be evaluated via ADRs. - -Primary implementation language: - -C++ - -Prefer a modern C++ standard supported consistently by our toolchain. - -Candidates should include C++23 where toolchain compatibility permits. - -Possible low-level dependencies to evaluate: - -Window/input: - -* SDL3 - -Graphics: - -* Vulkan directly - or -* another thin abstraction if strongly justified. - -Physics: - -* evaluate Jolt Physics or custom/specialized physics where appropriate. - -Audio: - -* lightweight library such as miniaudio. - -Developer UI: - -* Dear ImGui is acceptable for engineering/debug tooling. -* It is not automatically the final player UI. - -Serialization: -evaluate: - -* FlatBuffers, -* Protocol Buffers, -* Cap’n Proto, -* custom binary structures where justified. - -Do not introduce dependencies without documenting the reason. - -⸻ - -20. HEADLESS-FIRST SIMULATION ENGINE - -The most important software component is NOT the renderer. - -Create a graphics-independent simulation library. - -Potential name: - -libevo - -or an equivalent better project name. - -It must be usable by: - -* authoritative game server, -* headless ecosystem simulator, -* automated tests, -* benchmarking tools, -* client prediction where appropriate, -* offline development tools. - -Graphics must never be required to execute the biological simulation. - -Example conceptual API: - -SimulationWorld world; -world.tick(deltaTime); - -The headless simulation should eventually support commands like: - -evo-sim \ - --seed 123456 \ - --ticks 1000000 \ - --output simulation-results.json - -⸻ - -21. ECS / DATA-ORIENTED ARCHITECTURE - -The simulation should use a data-oriented Entity Component System or equivalent composition-based architecture. - -Do NOT construct a deep inheritance hierarchy such as: - -Animal -→ Mammal -→ Canine -→ Wolf. - -An organism should instead compose capabilities. - -Example entity: - -Entity - -* Transform -* Mass -* EnergyStorage -* Metabolism -* Genome -* Phenotype -* Locomotion -* Digestion -* SensorySystem -* ReproductiveSystem -* Health -* AIController. - -Photosynthetic organism: - -* Transform -* Mass -* EnergyStorage -* Genome -* Photosynthesis -* RootNetwork -* Reproduction -* ChemicalDefense. - -The engine should not require “Plant” and “Animal” base classes. - -Evaluate whether to: - -* build a minimal internal ECS, - or -* use a mature C++ ECS library. - -Create an ADR before deciding. - -⸻ - -22. SIMULATION DETERMINISM - -Deterministic behavior is highly valuable for: - -* debugging, -* regression tests, -* replay, -* server recovery, -* AI-written code validation, -* ecosystem comparison. - -Architect for deterministic simulation where practical. - -Requirements: - -* seeded PRNGs, -* no hidden use of global randomness, -* stable update ordering where necessary, -* explicit tick model, -* deterministic serialization where practical. - -Cross-platform floating-point exact determinism may not always be possible or desirable. - -Codex must document: - -* what is deterministic, -* what is approximately deterministic, -* what is intentionally nondeterministic. - -Create automated deterministic simulation regression tests. - -Example: - -same: - -* seed, -* initial state, -* simulation version, -* input stream - -should produce the same agreed result/hash where required. - -⸻ - -23. SIMULATION RESOLUTION / LEVEL OF DETAIL - -The MMO cannot simulate every organism at full fidelity globally. - -Implement conceptual simulation tiers. - -Tier 1 — Active entities - -Near players or otherwise important. - -Simulate: - -* position, -* velocity, -* physics, -* attacks, -* damage, -* perception, -* energy, -* individual reproduction, -* AI, -* interactions. - -Tier 2 — Local population simulation - -No longer maintain every individual. - -Represent: - -* genome/lineage, -* population, -* age distribution, -* biomass, -* average energy, -* reproduction, -* mortality, -* predation, -* migration. - -Tier 3 — Regional/planetary ecology - -Highly aggregated. - -Represent: - -* population density, -* biomass, -* resource consumption, -* nutrient flows, -* predator/prey relationships, -* environmental fitness, -* migration, -* atmosphere/environment contributions. - -Entities must be capable of: - -full entity -→ aggregate population - -and later: - -aggregate population -→ representative entities - -without changing the underlying genome identity. - -Design this carefully. - -⸻ - -24. SERVER AUTHORITATIVE NETWORK MODEL - -The server is authoritative. - -Clients may never authoritatively decide: - -* position, -* damage, -* energy, -* mutation, -* reproduction, -* genome state, -* resource collection, -* death. - -The client sends intentions/input. - -Example: - -InputFrame: - -* sequence, -* movement vector, -* orientation, -* action flags, -* interaction request. - -The server simulates the result. - -Client-side prediction may be used for responsiveness. - -The server sends: - -* snapshots, -* entity deltas, -* events, -* acknowledged input sequence. - -Implement: - -* prediction, -* reconciliation, -* interpolation, -* interest management. - -Do not make the client trusted. - -⸻ - -25. CUSTOM NETWORK STACK - -It is acceptable and likely expected to implement a custom real-time network backend. - -Separate concerns. - -Real-time simulation channel - -Likely UDP-based. - -Appropriate for: - -* movement, -* orientation, -* rapidly superseded entity state. - -Reliable gameplay channel - -Either: - -* reliable layer implemented over UDP, - or -* another justified mechanism. - -Used for: - -* mutation selection, -* reproduction events, -* death, -* region transitions, -* persistent biological decisions. - -Backend/API channel - -HTTPS and/or gRPC for: - -* Steam identity validation, -* account services, -* world selection, -* friends, -* lineage/history, -* administrative functions. - -Do not invent cryptography. - -Use established cryptographic libraries/protocols. - -Security design requires an ADR. - -⸻ - -26. NETWORK INTEREST MANAGEMENT - -Clients should only receive information they can meaningfully perceive. - -Evolutionary sensory abilities may eventually affect network relevance. - -Examples: - -Poor visual system: - -* no detailed distant visual entity state. - -Strong olfactory system: - -* receive directional scent field information rather than precise entity transforms. - -Echolocation: - -* receive derived acoustic perception information. - -This means the biological perception system and network interest-management system should eventually cooperate. - -Do not implement this complexity in Milestone 0. - -Design interfaces that will permit it later. - -⸻ - -27. WORLD PARTITIONING - -The planet must be partitioned into simulation regions. - -A region is owned at runtime by a simulation worker/server. - -Workers must NOT permanently own the persistent world state. - -Concept: - -World Director -→ assigns region -→ Region Server acquires lease -→ Region Server loads state -→ Region Server simulates -→ snapshots/events persisted. - -If the region process dies: - -lease expires -→ another worker acquires ownership -→ loads latest state -→ recovers -→ resumes. - -Kubernetes pods must be disposable. - -⸻ - -28. SEAMLESS REGION TRANSITION - -Eventually players must cross region boundaries without a traditional loading screen. - -Design for handoff: - -Region A owns organism. - -As boundary approaches: - -Region B receives ghost/shadow state. - -Then: - -authority transfers from A to B. - -Transition must avoid: - -* duplication, -* loss, -* two authoritative copies, -* exploit opportunities. - -This is not necessarily Milestone 0 implementation but architecture must account for it. - -⸻ - -29. PERSISTENCE MODEL - -Do NOT update PostgreSQL every simulation tick. - -Active simulation state lives primarily in process memory. - -Persistent world state should use combinations of: - -* snapshots, -* journals, -* durable events, -* checkpoints. - -Concept: - -snapshot -+ -events since snapshot - -current state. - -Region server crash recovery: - -load snapshot -→ replay persistent changes/events -→ resume. - -Determine where strict event sourcing is useful versus unnecessary complexity. - -Evolutionary history is particularly well-suited to durable event records. - -Potential events: - -* WORLD_CREATED -* GENOME_CREATED -* GENOME_MUTATED -* ORGANISM_REPRODUCED -* ORGANISM_DIED -* LINEAGE_CREATED -* SPECIATION_OCCURRED -* POPULATION_CHANGED -* LINEAGE_EXTINCT -* REGION_SNAPSHOT_CREATED. - -⸻ - -30. PHYLOGENETIC HISTORY - -Never permanently discard extinct genomes. - -The world should preserve its evolutionary history. - -The system should eventually support reconstructing: - -* parent genomes, -* child genomes, -* species/lineage divergence, -* population history, -* extinction events, -* common ancestors. - -Conceptually: - -Genome A -├─ Genome B -│ └─ Genome D -└─ Genome C -├─ Genome E -└─ Genome F - -This can power an in-game Tree of Life and historical tooling. - -⸻ - -31. INFRASTRUCTURE BASELINE - -Initial deployment environment: - -* Dell PowerEdge R730xd -* Kubernetes already available -* approximately 128 GB RAM -* additional hardware can be added later. - -The system must scale horizontally by adding physical Kubernetes nodes. - -Initial Kubernetes deployment may host most services on this one physical machine. - -Potential namespaces: - -* evolution-dev -* evolution-stage -* evolution-world0 - -world0 should be treated as persistent production-like state even when only developers/testers use it. - -Do not casually delete World 0. - -⸻ - -32. KUBERNETES SERVICE ARCHITECTURE - -Initial conceptual workloads: - -Platform/backend: - -* gateway/API -* account service -* identity integration -* genome service -* lineage service -* world director. - -Simulation: - -* active region servers, -* ecology workers, -* terrain/world workers, -* population workers. - -Infrastructure: - -* PostgreSQL, -* NATS JetStream, -* Redis if actually justified, -* object/blob storage, -* metrics, -* logging. - -Do NOT automatically create a microservice for every noun. - -Service boundaries should follow: - -* independent scaling requirements, -* failure domains, -* ownership/lifecycle differences, -* workload characteristics. - -A modular monolith is acceptable for early backend code where appropriate. - -Avoid distributed-systems complexity until there is a real benefit. - -⸻ - -33. MESSAGE BUS - -For early development, prefer evaluating: - -NATS JetStream - -before introducing Kafka. - -Potential events/topics: - -* world.region.assigned -* world.region.released -* organism.died -* organism.reproduced -* genome.created -* genome.extinct -* population.changed -* snapshot.completed. - -Kafka is not prohibited, but must not be introduced merely because this is an MMO. - -⸻ - -34. DATABASE - -PostgreSQL is the preferred initial relational source of truth. - -Potential persistent domains: - -* accounts, -* worlds, -* regions, -* genome metadata, -* lineages, -* evolutionary history, -* snapshot metadata, -* simulation versions, -* administrative records. - -Large chunk/snapshot binary payloads may belong in object storage rather than relational tables. - -Schema design must be versioned via migrations. - -⸻ - -35. OBJECT STORAGE - -Evaluate an S3-compatible system for: - -* voxel chunk snapshots, -* world snapshots, -* historical archives, -* simulation outputs, -* telemetry archives, -* large generated data. - -On the development cluster, MinIO or another suitable implementation may be evaluated. - -Do not store arbitrary huge binary blobs in PostgreSQL without justification. - -⸻ - -36. REDIS - -Redis is optional. - -Use it only for appropriate ephemeral workloads such as: - -* sessions, -* transient caches, -* routing hints, -* distributed short-lived state. - -Redis must not become the only durable copy of important world state. - -⸻ - -37. OBSERVABILITY - -Observability is mandatory from early development. - -Evaluate/use: - -* Prometheus, -* Grafana, -* Loki, -* OpenTelemetry where appropriate. - -Potential world metrics: - -* current players, -* active regions, -* active entities, -* known genomes, -* living lineages, -* extinct lineages, -* total biomass, -* photosynthetic energy capture, -* atmospheric oxygen, -* atmospheric carbon dioxide, -* decomposition rate, -* birth/death rates. - -Simulation metrics: - -* tick duration, -* worst region tick, -* entity count, -* ECS system timings, -* ecology worker backlog, -* chunk generation latency, -* network bandwidth. - -Infrastructure metrics: - -* CPU, -* memory, -* disk latency, -* storage capacity, -* packet loss, -* pod restarts, -* database performance. - -Instrumentation must be treated as part of engineering, not an afterthought. - -⸻ - -38. NODE SPECIALIZATION - -The initial server may run everything. - -The architecture must later permit Kubernetes node labels/affinities such as: - -* realtime simulation, -* background biosimulation, -* storage, -* database, -* GPU/compute if ever justified. - -Adding another physical server should increase available scheduling capacity without requiring game architecture changes. - -⸻ - -39. CI/CD - -Design a production-quality pipeline. - -Likely conceptual pipeline: - -Git commit -→ configure/build -→ compiler warnings -→ formatting validation -→ static analysis -→ unit tests -→ property tests -→ deterministic simulation tests -→ sanitizers -→ integration tests -→ ecosystem regression tests -→ benchmarks -→ container build -→ registry -→ development deployment -→ soak tests -→ staging -→ manual promotion to World 0/production. - -The project’s existing infrastructure experience favors: - -* container registry such as Harbor, -* Argo CD, -* Argo Workflows, -* GitOps deployment. - -Design with these technologies unless there is a strong documented reason not to. - -⸻ - -40. AI-ASSISTED DEVELOPMENT - -Most C++ implementation may be generated with AI systems such as Codex and Claude. - -Therefore repository structure and engineering rules must explicitly defend against AI-generated architectural drift. - -The authoritative order should be: - -1. architecture documentation, -2. ADRs, -3. public interfaces/contracts, -4. tests, -5. implementation. - -Never allow generated implementation to silently redefine architecture. - -⸻ - -41. ENGINEERING CONSTITUTION - -Create: - -docs/engineering/ENGINEERING_CONSTITUTION.md - -It must define at minimum: - -* supported C++ version, -* naming conventions, -* formatting, -* dependency policy, -* ownership model, -* pointer rules, -* threading policy, -* exception policy, -* error handling, -* logging, -* assertions, -* serialization rules, -* coordinate systems, -* units, -* deterministic randomness, -* simulation tick rules, -* floating-point expectations, -* API stability, -* testing requirements, -* documentation requirements, -* security expectations. - -Suggested ownership rules to evaluate: - -* values by default, -* std::unique_ptr for exclusive ownership, -* avoid std::shared_ptr unless shared lifetime is actually necessary, -* raw pointers/references only as non-owning observers. - -Use RAII. - -Avoid manually paired allocation/free operations. - -⸻ - -42. ERROR HANDLING - -Do not allow random inconsistency between: - -* exceptions, -* return bool, -* nullable values, -* error codes. - -Establish explicit rules. - -Consider std::expected for normal recoverable failures. - -Reserve exceptions for appropriate boundaries. - -Create an ADR. - -⸻ - -43. THREADING - -Threading rules must be defined BEFORE implementing complicated concurrency. - -Do not permit arbitrary components to spawn threads. - -Create explicit scheduler/thread ownership. - -Potential categories: - -* simulation thread(s), -* job system, -* networking IO, -* persistence/background IO, -* rendering. - -Avoid lock-free cleverness without proven need. - -AI-generated lock-free code must be considered high-risk. - -Use profilers before introducing complexity. - -⸻ - -44. TESTING REQUIREMENTS - -Testing is mandatory because large amounts of code may be AI-generated. - -Required categories: - -* unit tests, -* integration tests, -* property-based tests, -* fuzz tests where suitable, -* deterministic simulation tests, -* serialization round-trip tests, -* network protocol tests, -* load tests, -* crash recovery tests, -* benchmarks. - -Biological invariants should be testable. - -Examples: - -* energy cannot spontaneously appear except through defined external sources, -* mass cannot be negative, -* population cannot be negative, -* reproduction requires sufficient matter/energy, -* mutation prerequisites must be satisfied, -* dead organisms cannot perform active actions, -* ownership of an entity must be unique, -* region authoritative ownership cannot exist simultaneously in two servers. - -⸻ - -45. SANITIZERS / STATIC ANALYSIS - -Development and CI should use: - -* AddressSanitizer, -* UndefinedBehaviorSanitizer, -* ThreadSanitizer in dedicated jobs, -* clang-tidy, -* clang-format. - -Use strong warnings such as: - -* Wall, -* Wextra, -* Wpedantic. - -Decide carefully whether warnings-as-errors applies universally or only CI/owned code due to third-party dependency warnings. - -⸻ - -46. PERFORMANCE - -Performance matters but premature optimization is prohibited. - -Every serious optimization should ideally follow profiling. - -Create benchmark suites early. - -Likely hot areas later: - -* ECS iteration, -* spatial indexing, -* active entity simulation, -* voxel access, -* terrain meshing, -* network serialization, -* ecology calculations, -* procedural generation. - -Data layout must be considered from the beginning. - -⸻ - -47. SIMULATION VERSIONING - -The persistent world must know which simulation rules generated its state. - -Store an explicit simulation version. - -Example: - -biology-engine: 0.4.0 -world-format: 0.2.0 -network-protocol: 0.3.0. - -Changing biological rules can catastrophically alter the persistent ecosystem. - -Therefore production simulation upgrades require: - -production snapshot -→ clone -→ migrate -→ run accelerated simulation -→ compare ecology -→ approve -→ production migration. - -Do not casually canary different physical laws between adjacent regions of the same live world. - -⸻ - -48. WORLD CLONING - -The architecture should support cloning a persistent world snapshot into: - -* staging, -* development, -* simulation experiments. - -This will be used for: - -* biological algorithm changes, -* schema migrations, -* ecosystem regression testing, -* disaster recovery exercises. - -⸻ - -49. BACKUPS / DISASTER RECOVERY - -Design from the beginning for: - -* PostgreSQL backup, -* object-storage backup, -* world snapshots, -* snapshot verification, -* restore testing, -* retention, -* corruption detection. - -A power outage or Kubernetes restart must not reset world history. - -Region pods must recover automatically. - -⸻ - -50. STEAM - -The final client will be distributed through Steam. - -This is NOT a browser game. - -Steam integration is not part of Milestone 0. - -Later requirements include: - -* Steam identity/authentication, -* distribution, -* patch/update process, -* friends integration where appropriate, -* dedicated server considerations. - -The core account/world architecture must not be unnecessarily coupled directly to Steam APIs. - -Create a provider abstraction for identity where reasonable. - -⸻ - -51. SECURITY - -Threat model includes: - -* modified clients, -* fabricated packets, -* replay attacks, -* speed hacks, -* invalid mutation requests, -* impossible reproduction, -* duplicated region state, -* API abuse, -* compromised game-server process. - -Server authority should eliminate many client cheats. - -Security must include: - -* authenticated sessions, -* protocol validation, -* bounds checking, -* rate limiting, -* server-side validation, -* least privilege, -* Kubernetes RBAC, -* secrets handling. - -Never trust serialized client structures blindly. - -⸻ - -52. PROPOSED REPOSITORY STRUCTURE - -Do not treat this as immutable, but begin from something conceptually like: - -aeternalis-evolution/ -├── CMakeLists.txt -├── cmake/ -├── docs/ -│ ├── architecture/ -│ ├── adr/ -│ ├── engineering/ -│ ├── biology/ -│ ├── networking/ -│ ├── world/ -│ └── infrastructure/ -│ -├── src/ -│ ├── core/ -│ │ ├── math/ -│ │ ├── logging/ -│ │ ├── serialization/ -│ │ ├── jobs/ -│ │ └── time/ -│ │ -│ ├── simulation/ -│ │ ├── ecs/ -│ │ ├── scheduler/ -│ │ └── spatial/ -│ │ -│ ├── biology/ -│ │ ├── genome/ -│ │ ├── development/ -│ │ ├── phenotype/ -│ │ ├── metabolism/ -│ │ ├── reproduction/ -│ │ ├── mutation/ -│ │ └── ecology/ -│ │ -│ ├── world/ -│ │ ├── planet/ -│ │ ├── voxel/ -│ │ ├── terrain/ -│ │ ├── geology/ -│ │ ├── climate/ -│ │ └── resources/ -│ │ -│ ├── network/ -│ │ ├── transport/ -│ │ ├── protocol/ -│ │ ├── replication/ -│ │ └── interest/ -│ │ -│ ├── persistence/ -│ │ ├── snapshots/ -│ │ ├── events/ -│ │ └── database/ -│ │ -│ ├── server/ -│ │ ├── world_director/ -│ │ ├── region_server/ -│ │ └── ecology_worker/ -│ │ -│ ├── render/ -│ │ ├── graphics/ -│ │ ├── terrain/ -│ │ └── organism/ -│ │ -│ └── client/ -│ ├── input/ -│ ├── camera/ -│ └── ui/ -│ -├── apps/ -│ ├── evo-sim/ -│ ├── evo-server/ -│ ├── evo-client/ -│ └── evo-tools/ -│ -├── tests/ -│ ├── unit/ -│ ├── integration/ -│ ├── simulation/ -│ ├── determinism/ -│ ├── fuzz/ -│ └── benchmarks/ -│ -├── schemas/ -├── migrations/ -├── deploy/ -│ ├── docker/ -│ ├── kubernetes/ -│ ├── argocd/ -│ └── workflows/ -│ -└── tools/ - -It may be better to split infrastructure/backend repositories later. - -Do not prematurely create many repositories. - -Start with a structure that makes refactoring/splitting possible. - -⸻ - -53. INITIAL DEVELOPMENT MILESTONES - -MILESTONE 0 — Engineering Foundation - -Goal: - -Create an excellent C++ repository that AI agents can safely extend. - -Deliver: - -* CMake build, -* dependency strategy, -* engineering constitution, -* ADR framework, -* clang-format, -* clang-tidy, -* sanitizers, -* testing framework, -* benchmark framework, -* logging, -* basic metrics abstraction, -* CI skeleton, -* containerized headless build. - -No renderer required. - -⸻ - -MILESTONE 1 — Universal Simulation Kernel - -Create: - -* deterministic tick loop, -* basic ECS, -* entity identifiers, -* component lifecycle, -* job/scheduler foundation, -* seeded RNG service, -* units system, -* basic spatial representation. - -Demonstrate: - -create entity -→ tick simulation -→ serialize -→ restore -→ same deterministic result. - -⸻ - -MILESTONE 2 — Minimal Energy Ecosystem - -Create a simple headless world containing: - -* external energy source, -* resource matter, -* autotroph-like organism, -* consumer organism, -* death, -* decomposition, -* reproduction. - -Demonstrate: - -energy source -→ producer -→ consumer -→ death -→ nutrients -→ producer. - -Run thousands/millions of ticks. - -Expose metrics. - -⸻ - -MILESTONE 3 — Genome v0.1 - -Implement the first developmental genome. - -Initial scope may contain: - -* energy strategy, -* membrane, -* movement, -* ingestion, -* reproduction, -* size, -* environmental tolerance. - -Create: - -Genome -→ Development -→ Phenotype. - -Mutations alter genome. - -Phenotype derives simulation components. - -No arbitrary RPG modifiers. - -⸻ - -MILESTONE 4 — Population Abstraction - -Implement: - -* entity population collapse, -* aggregated population representation, -* background population simulation, -* re-materialization of representatives. - -Demonstrate: - -100 individual organisms -→ collapse into population -→ simulate 10,000 ticks -→ expand into representative organisms. - -Conservation/invariant testing required. - -⸻ - -MILESTONE 5 — Basic Voxel World - -Implement a small experimental voxel environment. - -Initial test volume may be: - -100×100×100 or chunk-based equivalent. - -Support: - -* material types, -* sparse chunks, -* deterministic generation, -* modification, -* snapshot, -* restore. - -Do not initially implement planet-scale geometry. - -⸻ - -MILESTONE 6 — Environmental Resources - -Connect voxel/environment data to organisms. - -Implement limited variables such as: - -* energy/light, -* moisture, -* one or two nutrients, -* organic matter. - -Demonstrate: - -organisms consume environmental resources -→ reproduce -→ die -→ decomposition returns resources. - -⸻ - -MILESTONE 7 — Persistent Region Server - -Create first authoritative headless region server. - -Implement: - -* active world ownership, -* simulation ticks, -* snapshotting, -* crash recovery, -* event persistence, -* health/readiness endpoints, -* metrics. - -Containerize it. - -⸻ - -MILESTONE 8 — Kubernetes World 0 - -Deploy to development Kubernetes. - -Initial workloads: - -* PostgreSQL, -* NATS JetStream if adopted, -* object storage if adopted, -* world director, -* region server, -* Prometheus/Grafana, -* logging. - -Create: - -* dev, -* stage, -* world0 environments. - -Demonstrate deleting the active region-server pod and automatically restoring world state. - -⸻ - -MILESTONE 9 — Custom 2D Client - -Begin graphical client. - -Implement only what cellular gameplay requires: - -* window/input, -* renderer, -* camera, -* UI debugging, -* network connection, -* basic organism rendering, -* environment rendering. - -Avoid building unnecessary 3D engine systems yet. - -⸻ - -MILESTONE 10 — Real-Time Multiplayer Cell Simulation - -Implement: - -* UDP transport, -* snapshots, -* input commands, -* prediction, -* reconciliation, -* interpolation, -* server authority, -* several simultaneous players. - -Demonstrate: - -20+ simulated clients. - -Then stress test much higher. - -⸻ - -MILESTONE 11 — Actual Cellular Gameplay - -Implement the first genuinely playable loop: - -* movement, -* feeding, -* energy, -* predation, -* reproduction, -* mutation selection, -* death, -* total restart, -* NPC descendants. - -This is the first milestone where the project should be judged primarily on FUN rather than architecture. - -⸻ - -MILESTONE 12 — Persistent Ecology - -NPC descendants persist. - -Implement: - -* player-derived lineages, -* population simulation, -* ecology during player absence, -* lineage extinction, -* historical genealogy. - -Test worlds should run unattended for days. - -Analyze: - -* runaway lineages, -* ecosystem collapse, -* starvation, -* predator/prey cycles, -* diversity. - -⸻ - -MILESTONE 13 — 3D Technology R&D - -Only after the cellular world is compelling. - -Research/prototype: - -* 3D renderer, -* smooth voxel terrain, -* body graph, -* procedural organism mesh, -* procedural locomotion, -* multicellular development. - -Do not prematurely integrate everything. - -Create isolated R&D prototypes. - -⸻ - -MILESTONE 14 — Multicellular Transition - -Build the first vertical slice where a player can: - -single cell -→ multicellular organism -→ enter 3D world. - -This is a major project milestone. - -⸻ - -54. FIRST PLAYABLE TARGET - -The first serious playable product is NOT: - -an entire evolutionary history from cell to civilization. - -The first target is: - -a compelling persistent cellular MMO ecosystem. - -Success criteria: - -* cellular movement feels good, -* feeding is interesting, -* predators/prey matter, -* mutation choices create meaningful tradeoffs, -* reproduction matters, -* player-derived descendants affect the world, -* permadeath is emotionally meaningful, -* repeated cellular lives do not feel identical, -* persistent ecology changes between play sessions. - -Only then expand aggressively into multicellularity. - -⸻ - -55. WHAT NOT TO DO - -Do NOT: - -* use Unreal, -* use Unity, -* create conventional RPG classes, -* create a visible linear evolution tree, -* make intelligence the mandatory endgame, -* distinguish NPCs with obvious UI labels, -* let offline characters farm progression, -* persist every simulation tick to PostgreSQL, -* simulate every world organism individually, -* allocate an entire planet’s voxels explicitly, -* build a renderer before validating simulation fundamentals, -* introduce Kafka because “MMOs use Kafka,” -* create 30 microservices immediately, -* create custom cryptography, -* use hand-authored creature animations as the fundamental movement solution, -* let AI implementation silently redefine architecture, -* optimize before measuring, -* sacrifice deterministic testability unnecessarily. - -⸻ - -56. OPEN DESIGN QUESTIONS - -Do not silently choose answers. - -Create design documents/ADRs for major unresolved items. - -Important questions include: - -1. Exact simulation tick frequency. -2. Fixed vs variable timestep boundaries. -3. ECS implementation. -4. C++ dependency management. -5. Units library. -6. Determinism guarantees. -7. Mutation-generation algorithm. -8. Genome representation. -9. Developmental body representation. -10. Reproductive mutation/heredity rules. -11. Whether autonomous NPC descendants mutate. -12. Definition of species/speciation. -13. Definition of lineage extinction. -14. Offline player-state handling. -15. Cellular-to-multicellular transition criteria. -16. Population abstraction math. -17. Active-region dimensions. -18. World/planet coordinate system. -19. Spherical planet voxel strategy. -20. Voxel LOD. -21. Surface meshing. -22. Hydrology. -23. Atmospheric model. -24. Cross-region ownership. -25. Network reliability layer. -26. Serialization. -27. Snapshot/event format. -28. Region recovery. -29. Cross-version simulation migration. -30. Steam identity integration. -31. Friend identification without NPC/player labels. -32. Anti-cheat boundaries. -33. AI behavior architecture. -34. Whether behavior itself can evolve genetically. -35. Player-designed morphology constraints. -36. Procedural animation strategy. -37. Persistence retention policies. -38. Disaster recovery objectives. - -⸻ - -57. DOCUMENTATION REQUIRED BEFORE MAJOR IMPLEMENTATION - -Create at minimum: - -docs/ -├── PROJECT_VISION.md -├── ROADMAP.md -├── engineering/ -│ └── ENGINEERING_CONSTITUTION.md -├── architecture/ -│ ├── SYSTEM_OVERVIEW.md -│ ├── SIMULATION_ARCHITECTURE.md -│ ├── WORLD_ARCHITECTURE.md -│ ├── PERSISTENCE_ARCHITECTURE.md -│ ├── NETWORK_ARCHITECTURE.md -│ └── INFRASTRUCTURE_ARCHITECTURE.md -├── biology/ -│ ├── GENOME_MODEL.md -│ ├── ENERGY_MODEL.md -│ ├── REPRODUCTION_MODEL.md -│ └── ECOLOGY_MODEL.md -└── adr/ - -Do not make these vague essays. - -Include: - -* diagrams, -* interfaces, -* invariants, -* alternatives, -* tradeoffs, -* failure modes. - -⸻ - -58. ADR FORMAT - -Each significant architectural choice should produce an ADR. - -Example: - -ADR-0001: C++ Language Standard -ADR-0002: Build System -ADR-0003: ECS Strategy -ADR-0004: Simulation Tick Model -ADR-0005: Random Number Strategy -ADR-0006: Serialization Format -ADR-0007: Network Transport -ADR-0008: Voxel Storage Model -ADR-0009: Persistence Strategy -ADR-0010: Message Bus - -ADR structure: - -* Context -* Decision -* Alternatives Considered -* Benefits -* Costs -* Risks -* Consequences -* Status - -⸻ - -59. AI AGENT WORK RULES - -Before editing code: - -1. Read relevant architecture docs. -2. Read relevant ADRs. -3. Inspect existing interfaces. -4. Inspect related tests. -5. State affected modules. -6. Preserve module boundaries. - -When introducing a dependency: - -* justify it, -* add an ADR if architecturally meaningful, -* pin/version appropriately. - -When changing a public interface: - -* explain why, -* update docs, -* update tests. - -When discovering architectural conflict: - -STOP expanding implementation. - -Document the conflict. - -Propose resolution. - -Do not silently route around architecture. - -⸻ - -60. IMPLEMENTATION QUALITY RULE - -Every milestone should leave the repository in a buildable, testable state. - -Prefer: - -small correct increments - -over: - -large speculative code dumps. - -Never create thousands of lines of placeholder architecture merely to make the repository look complete. - -Implement real vertical behavior. - -⸻ - -61. FIRST ASSIGNMENT - -Do NOT immediately implement gameplay. - -Perform the following in order. - -Step 1 — Analyze this project brief - -Produce: - -* concise project summary, -* architectural pillars, -* hard requirements, -* assumptions, -* open questions, -* largest technical risks. - -Do not reinterpret locked decisions. - -⸻ - -Step 2 — Produce the initial architecture - -Create: - -* system-context diagram, -* component diagram, -* runtime topology, -* data-flow diagram, -* simulation hierarchy, -* Kubernetes topology, -* persistence flow, -* region ownership flow. - -Mermaid diagrams are acceptable for documentation. - -⸻ - -Step 3 — Create initial ADR proposals - -At minimum evaluate: - -* C++23/toolchain, -* CMake, -* package/dependency manager, -* test framework, -* ECS strategy, -* logging, -* serialization, -* PostgreSQL client, -* metrics, -* NATS, -* voxel storage, -* deterministic PRNG. - -Do not choose libraries merely because they are popular. - -Consider: - -* maturity, -* performance, -* maintenance, -* licensing, -* portability, -* AI coding ergonomics, -* binary size, -* complexity. - -⸻ - -Step 4 — Create a phased implementation plan - -Break Milestones 0–4 into actionable engineering tasks. - -Each task must include: - -* objective, -* files/modules affected, -* dependencies, -* completion criteria, -* tests, -* risks. - -Tasks should usually be small enough to complete and review independently. - -⸻ - -Step 5 — Scaffold Milestone 0 - -After the design documents exist, begin repository setup. - -Expected initial outcome: - -project configures -project compiles -tests run -static analysis runs -sanitizer configuration exists -CI structure exists -documentation exists - -Create only minimal application targets such as: - -* evo-sim -* supporting libraries. - -⸻ - -Step 6 — Implement the smallest simulation proof - -Create the smallest deterministic simulation demonstrating: - -* simulation ticks, -* entity/component state, -* seeded randomness, -* serialization, -* restore, -* deterministic verification. - -No graphics. - -No networking. - -No Kubernetes dependency inside the simulation library. - -⸻ - -62. RESPONSE STYLE - -Do not respond to this project with generic game-development advice. - -Think like an engineer building a long-lived production system. - -Be opinionated, but distinguish: - -LOCKED REQUIREMENT -from -RECOMMENDATION -from -EXPERIMENT. - -When a simpler architecture accomplishes the same objective, prefer it. - -When complexity is required for the persistent-world vision, do not avoid it merely because it is difficult. - -The project is intentionally ambitious. - -The goal is to make that ambition manageable through strong boundaries, testing, simulation abstraction, and incremental implementation. - -⸻ - -63. NORTH STAR - -The ultimate intended experience is: - -A player enters a planet whose entire biological history was created by previous evolutionary success and failure. - -They begin as a single cell. - -They struggle for energy. - -They reproduce. - -Their descendants enter the ecosystem. - -They mutate. - -Perhaps they become photosynthetic. - -Perhaps predatory. - -Perhaps multicellular. - -Perhaps eventually enormous. - -Perhaps they create a lineage that survives for real-world years. - -Eventually they die. - -Their organism is gone permanently. - -The ecosystem remains. - -They begin again as a primitive cell in a world shaped partly by their previous lives. - -The world itself is the persistent protagonist. - -Build the technology that makes that possible. \ No newline at end of file diff --git a/docs/OpenAI_ChatLog.md b/docs/OpenAI_ChatLog.md deleted file mode 100644 index e802577..0000000 --- a/docs/OpenAI_ChatLog.md +++ /dev/null @@ -1,830 +0,0 @@ -I’ll establish the architecture and decision record first, then build a small headless simulation proof with replay and restore checks. I’ll inspect the repository and available toolchain before deciding what can be validated here, and keep unresolved game-design choices explicit. - - - - -Ran Get-Location; rg --files --hidden -g '!\.git' -g 'AGENTS.md' -g 'CMakeLists.txt' -g 'README*' -g '*.md' -g 'CMakePresets.json'; git status --short; Get-Command cmake, ninja, clang++, clang-format, clang-tidy, g++, cl, python, docker -ErrorAction SilentlyContinue | Select-Object Name, Source - - - - -Infra architecture, Biology world and Tooling adrs started working - - Ran commands, searched the web - - -The workspace is empty, and Visual Studio provides a usable C++ toolchain. I’m separating firm requirements from provisional choices: the first executable will test deterministic ticks, component state, seeded randomness, and snapshot recovery. It will contain no gameplay rules. -The architecture work is also making durability explicit: acknowledging a permanent death must mean that recovery cannot bring the organism back. - - - - -Edited files, ran commands - - -Tooling adrs, Infra architecture and Biology world updated - -The vision, module boundaries, simulation contract, engineering constitution, and M0–M4 task plan are written. The design keeps irreversible biological outcomes behind a durable commit boundary, and requires entity-to-population conversion to preserve resources and unique ownership. -Library choices are being recorded with scope limits. The proof will use only the standard library; the final ECS, network transport, serialization, and terrain mesher remain decisions with explicit evaluation gates. - - - - - Ran commands, searched the web - - -Tooling adrs updated - -Ran rg --files docs - - - - -Tooling adrs updated - -Edited a file, ran a command - - -I’m defining a frozen deterministic fixture before writing the kernel. An independent reference calculation now specifies the expected positions and state fingerprint after 1,000 ticks, so the test will check more than agreement between two runs of the same code. -One dependency finding affects the infrastructure proposal: MinIO’s community repository is archived. The design retains an S3-compatible storage boundary and leaves the deployed storage implementation open. - - - - -Edited a file, ran a command - - -Infra architecture and Biology world updated - - Ran commands - - -Tooling adrs updated - -The proof’s decoder contract now rejects malformed lengths, unsupported versions, invalid IDs, out-of-range coordinates, and checksum failures before publishing restored state. Recovery checks will compare canonical bytes as well as a state fingerprint. -The available native tools are MSVC 19.44, CMake 3.31.6, and LLVM 19.1.5. Ubuntu has no compiler installed, and Docker’s daemon is stopped; I’ll report those validation limits explicitly. - - - - -Infra architecture updated - -Infra architecture, Biology world and Tooling adrs updated - -The delegated document writes stalled in the tool layer. I’ve stopped those calls and am collecting the prepared drafts for writing through this session. The scope remains the architecture, foundation tooling, and a local simulation proof. - - - - - Ran commands - - -Biology world, Tooling adrs and Infra architecture updated - -Biology world, Tooling adrs and Infra architecture updated - -Edited files - - -Tooling adrs updated - -Edited files - - -Biology world finished - -Edited files - - - -You've hit your usage limit. Upgrade your plan or add credits to continue, or try again at 6:56 PM. - - - - - - - Edited 26 files+1,438-0Review changesUndoReview - -docs/PROJECT_VISION.mddocs/PROJECT_VISION.md+70-0 -docs/architecture/OPEN_QUESTIONS.mddocs/architecture/OPEN_QUESTIONS.md+50-0 -docs/architecture/SIMULATION_ARCHITECTURE.mddocs/architecture/SIMULATION_ARCHITECTURE.md+109-0 -docs/architecture/SYSTEM_OVERVIEW.mddocs/architecture/SYSTEM_OVERVIEW.md+98-0 -docs/engineering/ENGINEERING_CONSTITUTION.mddocs/engineering/ENGINEERING_CONSTITUTION.md+39-0 -AGENTS.mdAGENTS.md+24-0 -docs/ROADMAP.mddocs/ROADMAP.md+90-0 -schemas/proof-snapshot.mdschemas/proof-snapshot.md+10-0 -docs/engineering/TEST_STRATEGY.mddocs/engineering/TEST_STRATEGY.md+35-0 -README.mdREADME.md+85-0 -docs/architecture/WORLD_ARCHITECTURE.mddocs/architecture/WORLD_ARCHITECTURE.md+105-0 -docs/biology/GENOME_MODEL.mddocs/biology/GENOME_MODEL.md+78-0 -docs/adr/0001-language-toolchain.mddocs/adr/0001-language-toolchain.md+34-0 -docs/adr/0002-build-system.mddocs/adr/0002-build-system.md+34-0 -docs/adr/0003-dependencies.mddocs/adr/0003-dependencies.md+34-0 -docs/adr/0004-test-benchmark-framework.mddocs/adr/0004-test-benchmark-framework.md+34-0 -docs/adr/README.mddocs/adr/README.md+20-0 -docs/adr/0005-ecs-strategy.mddocs/adr/0005-ecs-strategy.md+34-0 -docs/adr/0006-tick-model.mddocs/adr/0006-tick-model.md+34-0 -docs/adr/0007-prng.mddocs/adr/0007-prng.md+34-0 -docs/adr/0008-serialization.mddocs/adr/0008-serialization.md+34-0 -docs/adr/0009-units-coordinates.mddocs/adr/0009-units-coordinates.md+34-0 -docs/adr/0019-voxel-storage-and-meshing.mddocs/adr/0019-voxel-storage-and-meshing.md+54-0 -docs/biology/ECOLOGY_MODEL.mddocs/biology/ECOLOGY_MODEL.md+97-0 -docs/biology/ENERGY_MODEL.mddocs/biology/ENERGY_MODEL.md+88-0 -docs/biology/REPRODUCTION_MODEL.mddocs/biology/REPRODUCTION_MODEL.md+80-0 -Collapse files - - - - - - - -Today 1:54 PM -Proceed. - - - - - - - -1:54 PM - - - - - - -Worked for 1h 26m 25s - - - -I’m continuing with the foundation. The implementation will affect only core value types, the headless simulation, its local snapshot codec, CLI telemetry, tests, and build tooling. I’ll use the documented fixture to verify the kernel, then run compilation, static analysis, formatting, and supported sanitizer checks. - - - - -Edited files - - -Infra architecture updated - -Ran Get-Content AGENTS.md,docs/engineering/ENGINEERING_CONSTITUTION.md,docs/architecture/SIMULATION_ARCHITECTURE.md,docs/adr/0005-ecs-strategy.md,docs/adr/0007-prng.md,docs/adr/0008-serialization.md,docs/adr/0010-error-handling.md,docs/adr/0011-thread-ownership.md; rg --files include src tests -ErrorAction SilentlyContinue - - - - -Infra architecture updated - -Ran git status --short; rg --files docs/architecture - - - - -The biology, world, and technology records are now in the repository. Two constraints are explicit: population conversion must preserve funded inventory, and permanent extinction cannot be inferred from a regional zero count while viable organisms, spores, suspended organisms, or transfers remain. -I’m finishing the persistence and deployment contracts, then applying the prepared kernel and tests. - - - - -Infra architecture finished - -Edited files, ran a command - - -Biology world and Infra architecture finished - -Edited files - - -The independent review found a CLI file-safety issue: different filenames can be hard links to the same file. I’m adding identity checks and a regression test so an output report cannot overwrite a snapshot. -The architecture review also tightened recovery: checkpoints must contain committed state, and host-loss recovery needs the complete causal state chain. Retaining death records alone is insufficient to restore a consistent ecosystem. - - - - -Edited files - - -Tooling adrs updated - -Edited files, ran a command - - -Tooling adrs updated - - Ran commands - - -Tooling adrs and Infra architecture updated - -Infra architecture finished - -Edited files, ran commands - - -The first native build passes all five CTest entries, including the frozen simulation result, restore continuation, malformed snapshots, Release-safe test harness check, and CLI file round trips. -The 1,000-tick run matches the independently calculated fingerprint d61ad5bf0c928c76. I’m checking Release, static analysis, and AddressSanitizer next. - - - - -Edited files, ran commands - - - -You've hit your usage limit. Upgrade your plan or add credits to continue, or try again at 6:56 PM. - - - - - - - Edited 37 files+1,974-32Review changesUndoReview - -docs/adr/0010-error-handling.mddocs/adr/0010-error-handling.md+34-0 -docs/adr/0011-thread-ownership.mddocs/adr/0011-thread-ownership.md+34-0 -docs/adr/0012-logging.mddocs/adr/0012-logging.md+34-0 -docs/adr/0013-postgresql-client.mddocs/adr/0013-postgresql-client.md+34-0 -docs/adr/0014-message-bus.mddocs/adr/0014-message-bus.md+34-0 -docs/adr/0015-observability.mddocs/adr/0015-observability.md+34-0 -docs/adr/DEPENDENCY_EVALUATION.mddocs/adr/DEPENDENCY_EVALUATION.md+26-0 -docs/architecture/INFRASTRUCTURE_ARCHITECTURE.mddocs/architecture/INFRASTRUCTURE_ARCHITECTURE.md+104-0 -docs/architecture/NETWORK_ARCHITECTURE.mddocs/architecture/NETWORK_ARCHITECTURE.md+81-0 -docs/architecture/PERSISTENCE_ARCHITECTURE.mddocs/architecture/PERSISTENCE_ARCHITECTURE.md+149-5 -docs/infrastructure/OPERATIONS.mddocs/infrastructure/OPERATIONS.md+74-5 -docs/adr/0016-persistence-and-region-ownership.mddocs/adr/0016-persistence-and-region-ownership.md+34-0 -docs/adr/0017-network-security.mddocs/adr/0017-network-security.md+34-0 -docs/adr/0018-infrastructure-services.mddocs/adr/0018-infrastructure-services.md+34-0 -include/evo/core/random.hppinclude/evo/core/random.hpp+30-0 -include/evo/core/types.hppinclude/evo/core/types.hpp+49-1 -include/evo/simulation/world.hppinclude/evo/simulation/world.hpp+47-0 -include/evo/telemetry/sinks.hppinclude/evo/telemetry/sinks.hpp+34-0 -src/simulation/snapshot.cppsrc/simulation/snapshot.cpp+115-0 -src/simulation/world.cppsrc/simulation/world.cpp+47-0 -apps/evo-sim/main.cppapps/evo-sim/main.cpp+216-16 -tests/benchmarks/simulation_benchmark.cpptests/benchmarks/simulation_benchmark.cpp+46-1 -tests/fuzz/snapshot_fuzz.cpptests/fuzz/snapshot_fuzz.cpp+23-0 -tests/simulation_tests.cpptests/simulation_tests.cpp+231-1 -tests/cli_integration.cmaketests/cli_integration.cmake+62-0 -.clang-format.clang-format+10-0 -.clang-tidy.clang-tidy+7-1 -.editorconfig.editorconfig+15-0 -.gitignore.gitignore+12-0 -CMakeLists.txtCMakeLists.txt+77-0 -CMakePresets.jsonCMakePresets.json+26-0 -cmake/ProjectOptions.cmakecmake/ProjectOptions.cmake+55-1 -tools/check-format.cmaketools/check-format.cmake+14-0 -tools/windows-check.ps1tools/windows-check.ps1+45-1 -.dockerignore.dockerignore+8-0 -deploy/README.mddeploy/README.md+36-0 -deploy/docker/Dockerfiledeploy/docker/Dockerfile+29-0 - - - -Proceed. Setup git. And pushed to Gitea repo. We can setup a git action and setup Argo application - -**Git is already initialized and points to https://git.aeternalisgames.com/dingo/AEvolution.git. What Argo CD URL/project and Kubernetes context or kubeconfig should I use? I propose a manual-sync application in evolution-dev for this foundation.** - -I’ll add the Argo application manually, it will deploy to k8s. - -**Which container registry/repository should Gitea Actions publish to, and which runner label should the workflow use? If Harbor and its credentials are already configured, give me the registry path and secret names; don’t send secret values.** - -You can put placeholder values it would point to registry.aeternalisgames.com (harbor registry) - -Edited 13 files+369-3Review changesUndoReview - -.gitea/workflows/foundation.yml.gitea/workflows/foundation.yml+69-0 -deploy/argocd/application.yaml.exampledeploy/argocd/application.yaml.example+18-0 -deploy/argocd/namespace.yaml.exampledeploy/argocd/namespace.yaml.example+5-0 -deploy/argocd/project.yaml.exampledeploy/argocd/project.yaml.example+20-0 -deploy/docker/Dockerfiledeploy/docker/Dockerfile+23-2 -deploy/kubernetes/dev/job.yamldeploy/kubernetes/dev/job.yaml+44-0 -deploy/kubernetes/dev/kustomization.yamldeploy/kubernetes/dev/kustomization.yaml+11-0 -deploy/kubernetes/dev/networkpolicy.yamldeploy/kubernetes/dev/networkpolicy.yaml+13-0 -deploy/kubernetes/dev/serviceaccount.yamldeploy/kubernetes/dev/serviceaccount.yaml+10-0 -docs/adr/0020-foundation-delivery.mddocs/adr/0020-foundation-delivery.md+73-0 -tests/benchmarks/simulation_benchmark.cpptests/benchmarks/simulation_benchmark.cpp+1-1 -tools/ci/linux-check.shtools/ci/linux-check.sh+49-0 -tools/ci/publish-image.shtools/ci/publish-image.sh+33-0 - -proceed with the project. document what has been done and what the next steps are. I have gitea/argo/registry build all setup, so you can update deploy at any point. - -Pushed to Gitea: 1c6e6e1. Latest CI passed. -- Documented completed work and next steps in [STATUS.md](C:/Dev/AEvolution/docs/STATUS.md). -- Recorded Windows/Linux tests, sanitizers, fuzzing and deterministic replay results. -- Published the Harbor image and pinned the dev manifest to a verified digest. -Next: ECS evaluation → scheduler/input ordering → spatial queries → energy ledger. -Argo rollout remains unverified; I still need its application/GitOps source mapping. - - Edited 15 files+161-30Review changesUndoReview - -.gitattributes.gitattributes+5-0 -README.mdREADME.md+5-3 -deploy/kubernetes/dev/kustomization.yamldeploy/kubernetes/dev/kustomization.yaml+3-2 -docs/ROADMAP.mddocs/ROADMAP.md+1-1 -docs/STATUS.mddocs/STATUS.md+66-0 -docs/adr/0020-foundation-delivery.mddocs/adr/0020-foundation-delivery.md+4-3 -docs/adr/README.mddocs/adr/README.md+2-1 -docs/architecture/INFRASTRUCTURE_ARCHITECTURE.mddocs/architecture/INFRASTRUCTURE_ARCHITECTURE.md+4-2 -tools/ci/publish-image.shtools/ci/publish-image.sh+2-1 -tools/windows-check.ps1tools/windows-check.ps1+10-7 -.gitea/workflows/build.yaml.gitea/workflows/build.yaml+12-1 -deploy/docker/Dockerfiledeploy/docker/Dockerfile+3-1 -tools/ci/tsan-profile.mjstools/ci/tsan-profile.mjs+30-0 -deploy/README.mddeploy/README.md+8-3 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+6-5 - -Continue - - - - - - - -Saturday 10:04 AM - - - - - - -I’ll move into M1.5: compare the current component store with a mature ECS using a small, isolated benchmark. I’ll document the workloads and decision criteria first, then measure both without changing the production simulation API. - - - - - Ran commands, searched the web - - -I’ll use EnTT 4.0.0 as the first comparison candidate, pinned by commit and file hashes. It will be an opt-in experiment; normal builds will still require no downloads. -The benchmark will measure dense and sparse queries, entity churn, canonical serialization/restore, and allocator-visible memory. Both stores must produce identical state. Changes are confined to the experiment, build/test tooling and documentation. - - - - -Edited files, ran a command - - - -You've hit your usage limit. Upgrade your plan or add credits to continue, or try again later. - - - - - - - Edited 2 files+144-0Review changesUndoReview - -docs/adr/0021-ecs-evaluation.mddocs/adr/0021-ecs-evaluation.md+71-0 -docs/engineering/ECS_EVALUATION.mddocs/engineering/ECS_EVALUATION.md+73-0 - -Continue - - - - - - - -Saturday 1:57 PM - - - - - - -Worked for 30m 59s - - - -Completed the ECS evaluation and pushed 8c653b9. Gitea CI passed. -- Windows/Linux results match across all 56 deterministic fingerprints. -- Current storage remains appropriate for the bounded proof; production ECS selection remains open. -- Findings, completed work, and next steps are documented in [project status](C:/Dev/AEvolution/docs/STATUS.md) and [ECS evaluation](C:/Dev/AEvolution/docs/engineering/ECS_EVALUATION.md). -Next: M1.6—deterministic scheduler phases and input ordering. Kubernetes rollout remains unverified. - - Edited 15 files+662-20Review changesUndoReview - -CMakeLists.txtCMakeLists.txt+22-0 -experiments/ecs/comparison.cppexperiments/ecs/comparison.cpp+509-4 -tools/check-format.cmaketools/check-format.cmake+2-1 -tools/entt-pin.cmaketools/entt-pin.cmake+3-0 -tools/prepare-entt.cmaketools/prepare-entt.cmake+11-0 -docs/engineering/ECS_EVALUATION.mddocs/engineering/ECS_EVALUATION.md+57-2 -.gitea/workflows/build.yaml.gitea/workflows/build.yaml+1-1 -deploy/docker/Dockerfiledeploy/docker/Dockerfile+16-0 -docs/adr/README.mddocs/adr/README.md+1-0 -README.mdREADME.md+1-0 -docs/ROADMAP.mddocs/ROADMAP.md+5-3 -docs/STATUS.mddocs/STATUS.md+12-6 -docs/adr/0005-ecs-strategy.mddocs/adr/0005-ecs-strategy.md+19-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+2-2 -docs/architecture/OPEN_QUESTIONS.mddocs/architecture/OPEN_QUESTIONS.md+1-1 - -What’s next? - - - - - - - -Saturday 4:24 PM - - - - - - -Next is M1.6: deterministic scheduling and input handling. This establishes how simulation work executes before we add biological systems. -The increment will: -1. Document tick phases, command ordering, and late/duplicate input handling. -2. Implement a sequential scheduler with one authoritative writer. -3. Apply commands at explicit tick boundaries. -4. Test replay equivalence, invalid commands, and snapshot/restore continuation. -5. Update progress documentation and push through Gitea CI. -Then: -- M1.7 — Spatial queries: find nearby entities with tested boundary behavior. -- M2.1 — Energy/matter ledger: conserved transfers and nonnegative balances. -- M2.2 onward — Minimal ecosystem: energy capture, consumption, reproduction, death, and decomposition. -Separately, the existing dev deployment needs a verified Argo run. That doesn’t block simulation development. - - -Saturday 4:24 PM - - - - - - - - -Proceed, Argo confirmed when we are ready for a pod to be made, it can be added to the deployment and it will update in Argo - - - - - - - -Saturday 4:30 PM - - - - - - -I’ll implement M1.6’s deterministic scheduling and input contract, then verify replay and recovery behavior through the existing checks. I’ll also record that Argo is ready for deployment updates when we introduce a persistent workload. - - - - - Ran commands - - -Affected modules are the simulation scheduler, public command contracts, tests, and architecture documentation. The scheduler will admit a bounded batch at one exact tick, order commands by host-assigned sequence, apply lifecycle changes, then advance simulation. Invalid batches will leave state unchanged. This remains a synthetic engineering proof; client authentication and network retry handling belong to the later server boundary. - - - - -Edited files, ran commands - - -The scheduler passes the first Release checks. All six orderings of each test batch produce identical state, rejected batches leave snapshots unchanged, and the existing no-input golden still matches. I’m running static analysis and sanitizers next, then updating the progress record and pushing through CI. - - - - -Edited files, ran commands - - -Native Release, clang-tidy, formatting, and ASan checks all passed. The push found a newer GitOps commit on the remote; it changes the dev image pin. I’ll preserve that change and rebase the scheduler work onto it before retrying the push. - -You've hit your usage limit. Upgrade your plan or add credits to continue, or try again later. - - - - - - - Edited 13 files+388-21Review changesUndoReview - -docs/adr/0022-sequential-command-scheduler.mddocs/adr/0022-sequential-command-scheduler.md+68-0 -docs/adr/README.mddocs/adr/README.md+1-0 -docs/architecture/SCHEDULER_CONTRACT.mddocs/architecture/SCHEDULER_CONTRACT.md+44-0 -docs/architecture/SIMULATION_ARCHITECTURE.mddocs/architecture/SIMULATION_ARCHITECTURE.md+4-0 -CMakeLists.txtCMakeLists.txt+1-1 -include/evo/simulation/scheduler.hppinclude/evo/simulation/scheduler.hpp+44-0 -src/simulation/scheduler.cppsrc/simulation/scheduler.cpp+74-0 -tests/simulation_tests.cpptests/simulation_tests.cpp+99-1 -README.mdREADME.md+1-0 -docs/ROADMAP.mddocs/ROADMAP.md+4-3 -docs/STATUS.mddocs/STATUS.md+22-10 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+18-1 -deploy/README.mddeploy/README.md - -Continue - - - - - - - -Saturday 7:16 PM - - - - - - -35 previous messages - - - -M1.7 is complete and pushed. -- Added deterministic periodic neighborhood queries and boundary tests. -- Windows checks and Linux CI 1409 passed. -- All 72 benchmark results match across platforms. -- [Status and next steps](C:/Dev/AEvolution/docs/STATUS.md) updated. -The implementation is a measured linear-scan baseline; production indexing remains deferred. -Next: M2.1—conserved energy and matter accounting, before introducing organisms. - - Edited 14 files+391-16Review changesUndoReview - -CMakeLists.txtCMakeLists.txt+6-2 -docs/adr/0023-local-neighborhood-queries.mddocs/adr/0023-local-neighborhood-queries.md+58-0 -docs/adr/README.mddocs/adr/README.md+2-1 -docs/architecture/SIMULATION_ARCHITECTURE.mddocs/architecture/SIMULATION_ARCHITECTURE.md+4-1 -docs/architecture/SPATIAL_CONTRACT.mddocs/architecture/SPATIAL_CONTRACT.md+63-0 -include/evo/simulation/spatial.hppinclude/evo/simulation/spatial.hpp+10-0 -src/simulation/spatial.cppsrc/simulation/spatial.cpp+30-0 -tests/benchmarks/spatial_benchmark.cpptests/benchmarks/spatial_benchmark.cpp+75-0 -tests/simulation_tests.cpptests/simulation_tests.cpp+95-4 -README.mdREADME.md+4-2 -docs/ROADMAP.mddocs/ROADMAP.md+3-1 -docs/STATUS.mddocs/STATUS.md+13-5 -tools/ci/linux-check.shtools/ci/linux-check.sh+1-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+27-0 - -Proceed - - - - - - - -Saturday 7:36 PM - - - - - - -34 previous messages - - - -M2.1 is complete and pushed. -- Added typed energy/matter inventories with atomic transfers, overflow checks, and replay protection. -- One million seeded transactions passed conservation checks. -- Windows validation and Linux CI 1411 passed. -- [Status and next steps](C:/Dev/AEvolution/docs/STATUS.md) updated. -Next: M2.2—finite energy sources and producer processes, including conversion losses and fractional-rate accounting. - - Edited 12 files+535-12Review changesUndoReview - -CMakeLists.txtCMakeLists.txt+13-2 -docs/adr/0024-conserved-inventory-ledger.mddocs/adr/0024-conserved-inventory-ledger.md+77-0 -include/evo/accounting/ledger.hppinclude/evo/accounting/ledger.hpp+71-0 -src/accounting/ledger.cppsrc/accounting/ledger.cpp+87-0 -docs/adr/README.mddocs/adr/README.md+1-0 -docs/biology/ENERGY_MODEL.mddocs/biology/ENERGY_MODEL.md+31-0 -tests/ledger_tests.cpptests/ledger_tests.cpp+196-0 -README.mdREADME.md+4-2 -docs/ROADMAP.mddocs/ROADMAP.md+7-3 -docs/STATUS.mddocs/STATUS.md+15-3 -docs/architecture/SYSTEM_OVERVIEW.mddocs/architecture/SYSTEM_OVERVIEW.md+4-2 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+29-0 - -Is this attached to a PostgreSQL db already? Or planned - - - - - - - -Saturday 8:08 PM - - - - - - -PostgreSQL is planned, not connected yet. The current simulation and accounting ledger run entirely in memory. The particle proof supports local snapshot files; the new ledger does not yet have persistence. -PostgreSQL is intended for world/region metadata, genome and lineage history, ownership records, and snapshot references. Large snapshot payloads are planned for object storage. -Persistent integration comes with M7’s region server, followed by M8’s Kubernetes deployment. Active simulation will remain in memory, with checkpoints and durable events—not database writes every tick. - - -Saturday 8:08 PM - - - - - - - - -Continue - - - - - - - -Saturday 8:11 PM - - - - - - -I’ll continue with M2.2: finite energy capture and producer processes on top of the ledger. I’ll first define the rate, conversion-loss, and rollback contracts so resource accounting and process state advance together. - - - - -Ran git status --short --branch; Get-Content include/evo/accounting/ledger.hpp; Get-Content docs/biology/ENERGY_MODEL.md; Get-Content docs/adr/0024*; Get-Content docs/engineering/ENGINEERING_CONSTITUTION.md; Get-Content docs/PROJECT_VISION.md -TotalCount 40; Get-Content tests/ledger_tests.cpp -TotalCount 65; Get-Content CMakeLists.txt -TotalCount 90 - - - - -Affected modules are a new synthetic producer-process library, its tests, and the energy-model docs. The process will own its ledger so callers cannot route heat back into usable reserve. It will capture a bounded amount from a finite source, account for conversion losses, then grow only when both energy and the specified material recipe are available. These are test-fixture rules, not organism biology or live-world rules. - - - - -Edited files, ran commands - - -The producer process passes its first Release tests. Hand-calculated cases and 32 seeded runs verify capture, fractional conversion, resource-limited growth, heat accumulation, and replay. Once source energy is exhausted, growth can use only energy already stored in reserve; accumulated heat cannot fund it. I’m adding arithmetic-boundary checks before running sanitizers and analysis. - - - - -Edited files, ran commands - - - -You've hit your usage limit. Upgrade your plan or add credits to continue, or try again later. - - - - - - - Edited 11 files+476-5Review changesUndoReview - -CMakeLists.txtCMakeLists.txt+10-0 -docs/adr/0025-finite-producer-process.mddocs/adr/0025-finite-producer-process.md+76-0 -include/evo/processes/producer.hppinclude/evo/processes/producer.hpp+59-0 -src/processes/producer.cppsrc/processes/producer.cpp+85-0 -tests/producer_tests.cpptests/producer_tests.cpp+181-0 -docs/ROADMAP.mddocs/ROADMAP.md+4-1 -docs/STATUS.mddocs/STATUS.md+11-3 -docs/adr/README.mddocs/adr/README.md+1-0 -docs/architecture/SYSTEM_OVERVIEW.mddocs/architecture/SYSTEM_OVERVIEW.md+2-1 -docs/biology/ENERGY_MODEL.mddocs/biology/ENERGY_MODEL.md+29-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+18-0 - -Proceee - - - - - - - -Sunday 8:56 AM - - - - - - -17 previous messages - - - -M2.2 is complete and pushed. -- Added finite energy capture, conversion losses, resource-limited growth, and exact fractional accounting. -- Windows checks and Linux CI 1413 passed. -- [Project status](C:/Dev/AEvolution/docs/STATUS.md) updated. -Next: M2.3—consumer interactions and validated feeding transfers. PostgreSQL remains planned; this is still an in-memory simulation fixture. - - Edited 2 files+7-1Review changesUndoReview - -docs/STATUS.mddocs/STATUS.md+2-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+5-1 - - - - - -Sunday 9:04 AM - - - - - - - - -Yesterday 10:22 AM -Proceed - - - - - - - -Sunday 10:22 AM - - - - - - -27 previous messages - - - -M2.3 is complete and pushed. -- Added shared producer/consumer feeding with intake limits, heat/waste accounting, and atomic tick rollback. -- Windows checks and Linux CI 1415 passed. -- [Project status](C:/Dev/AEvolution/docs/STATUS.md) updated. - -Next: M2.4—death with remaining inventory, corpse ownership, and decomposition returning nutrients. This remains an in-memory synthetic simulation. - - Edited 14 files+493-8Review changesUndoReview - -CMakeLists.txtCMakeLists.txt+6-1 -docs/adr/0026-shared-feeding-community.mddocs/adr/0026-shared-feeding-community.md+85-0 -include/evo/processes/feeding.hppinclude/evo/processes/feeding.hpp+51-0 -include/evo/processes/producer.hppinclude/evo/processes/producer.hpp+1-0 -src/processes/feeding.cppsrc/processes/feeding.cpp+129-0 -src/processes/producer.cppsrc/processes/producer.cpp+5-2 -tests/feeding_tests.cpptests/feeding_tests.cpp+139-0 -docs/ROADMAP.mddocs/ROADMAP.md+4-1 -docs/STATUS.mddocs/STATUS.md+15-4 -docs/adr/0025-finite-producer-process.mddocs/adr/0025-finite-producer-process.md+3-0 -docs/adr/README.mddocs/adr/README.md+1-0 -docs/architecture/SYSTEM_OVERVIEW.mddocs/architecture/SYSTEM_OVERVIEW.md+4-0 -docs/biology/ENERGY_MODEL.mddocs/biology/ENERGY_MODEL.md+28-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+22-0 - -Proceed - - - - - - - -Sunday 3:21 PM - - - - - - -32 previous messages - - - -M2.4 is complete and pushed. -- Death preserves remaining inventory as a corpse. -- Bounded decomposition returns nutrients and releases energy as heat. -- Tests verify conservation, terminality, rollback, and subsequent producer growth. -- Windows checks and Linux CI 1417 passed. -[Project status](C:/Dev/AEvolution/docs/STATUS.md) is updated. Next: M2.5—funded reproduction and offspring identity. - - Edited 9 files+351-15Review changesUndoReview - -docs/adr/0027-terminal-inventory-and-decomposition.mddocs/adr/0027-terminal-inventory-and-decomposition.md+80-0 -include/evo/processes/feeding.hppinclude/evo/processes/feeding.hpp+20-3 -src/processes/feeding.cppsrc/processes/feeding.cpp+65-6 -tests/feeding_tests.cpptests/feeding_tests.cpp+119-0 -docs/ROADMAP.mddocs/ROADMAP.md+3-1 -docs/STATUS.mddocs/STATUS.md+14-5 -docs/adr/README.mddocs/adr/README.md+1-0 -docs/biology/ENERGY_MODEL.mddocs/biology/ENERGY_MODEL.md+28-0 -docs/engineering/VALIDATION.mddocs/engineering/VALIDATION.md+21-0 -