fix: enforce village resource invariants
This commit is contained in:
@@ -18,17 +18,21 @@ world only when consumed.
|
||||
|
||||
## Authority
|
||||
|
||||
- `StorageStateRecord` owns pantry contents and capacity.
|
||||
- `StorageStateRecord` owns pantry and woodpile contents and capacity.
|
||||
- `SimNPC.inventory` owns carried item amounts.
|
||||
- `SimulationManager` performs deposit, withdrawal, and consumption
|
||||
transactions.
|
||||
- `village.food` is a synchronized aggregate view used by the existing UI,
|
||||
priorities, and utility scoring. It is not a second mutation path.
|
||||
- `village.food` and `village.wood` are synchronized aggregate views used by
|
||||
the existing UI, priorities, and utility scoring. They are not second
|
||||
mutation paths.
|
||||
- `StorageNode` supplies the active-world interaction position and presentation
|
||||
for deposit, withdrawal, eating, and current player pantry interaction.
|
||||
|
||||
The village pantry has stable ID `village_pantry`. Storage and NPC inventory
|
||||
are included in versioned state and deterministic checksums.
|
||||
The village pantry has stable ID `village_pantry`; the woodpile has stable ID
|
||||
`village_woodpile`. Storage and NPC inventory are included in versioned state
|
||||
and deterministic checksums. Patrol and study require one wood on completion:
|
||||
the effect is applied only when that unit can be withdrawn, and selection does
|
||||
not choose those actions while the woodpile is empty.
|
||||
|
||||
Successful extraction, deposit, withdrawal, and consumption also append
|
||||
structured economic facts. See [the economic event stream](ECONOMIC_EVENTS.md).
|
||||
|
||||
@@ -652,14 +652,12 @@ Completed after the architecture gate:
|
||||
|
||||
The practical next sequence is:
|
||||
|
||||
1. Expand the structured event feed with actor/target/cause metadata so the
|
||||
inspector can show a readable timeline per NPC. Narrative events for task
|
||||
starts, sleep, and death are recorded; next should add depletion notices,
|
||||
relationship seeds, and village-level event summaries filtered by relevance.
|
||||
2. Seed relationship dimensions (familiarity, trust, obligation) from shared
|
||||
work, meal, and sleep proximity, then expose them through utility
|
||||
considerations so NPCs begin to prefer known colleagues and familiar routes.
|
||||
Start with one lightweight dimension before building the full graph.
|
||||
1. Move proven action preconditions and material costs into a reusable contract,
|
||||
beginning with the patrol/study wood dependency, then expose unavailable
|
||||
choices and interruption reasons in the NPC inspector.
|
||||
2. Grow the existing familiarity seed into one consequence-bearing relationship
|
||||
dimension, such as trust or obligation, driven by structured events rather
|
||||
than proximity alone.
|
||||
|
||||
Recently completed:
|
||||
|
||||
@@ -706,7 +704,8 @@ Recently completed:
|
||||
- Wood inventory and woodpile storage: wood now follows the same
|
||||
gather→carry→deposit pattern as food. VillageWoodpile StorageNode receives
|
||||
wood deposits. Village wood syncs from storage. Economic events track all
|
||||
transfers.
|
||||
transfers. Patrol and study no longer produce benefits without paying their
|
||||
one-wood cost, and utility selection avoids those actions when wood is empty.
|
||||
- Structured event feed: EconomicEventRecord now supports narrative events
|
||||
(task started, NPC slept, NPC died) alongside economic transfers.
|
||||
Per-NPC event history with human-readable descriptions exposed in the
|
||||
|
||||
@@ -107,3 +107,8 @@ pip install gdtoolkit
|
||||
```
|
||||
|
||||
The script exits non-zero on any failure, so it will fail the CI step.
|
||||
|
||||
The shell gate isolates Godot's cross-platform user-data paths under
|
||||
`logs/quality/godot_profile`. It also treats Godot script parse/load markers as
|
||||
failures because headless Godot can report those errors while returning a zero
|
||||
process exit code.
|
||||
|
||||
Reference in New Issue
Block a user