Summary And Gameplay Impact
Add a compact, clean-room settlement/NPC/faction pressure layer for living worlds. This gives towns, districts, factions, establishments, and notable NPCs persistent texture and pressure without asking the DM/story layer to invent every civic beat from scratch.
Current ClawDnD State
ClawDnD has world content, locations, factions, strategic clocks, Atlas, Relations/Camp, and player-known codex lanes. Issue #143 tracks rare world-gen NPC/quest variant matrices. What is missing is a typed settlement pressure model tied to locations/factions/worldsim: governance, safety, economy, unrest, faction influence, establishment hooks, notable public NPC roles, and player-known civic state.
External Source Value And Recommendation
Use ryceg/Eigengrau-s-Essential-Establishment-Generator and opendnd/opendnd as mechanics-shape references only. Do not import generated prose, names, tables, frontend/runtime dependencies, or content. Eigengrau has useful concepts around establishments and civic texture; OpenDnD has limited lane-specific value.
Architecture Plan
- Add optional
SettlementProfile, LocalFactionLink, and SettlementPressure models tied to existing Location, Faction, and strategic state.
- Seed authored settlement blocks from world/area JSON.
- Generate deterministic defaults from location tags only when safe and clearly marked as generated.
- Let
worldsim tick unrest, faction pressure, local assets, civic clocks, and backlog suggestions through engine-owned paths.
- Surface player-known settlement state in Atlas, Relations, and Codex projections.
- Keep hidden DM notes, sealed agendas, private lore, and generator provenance out of player-safe read models.
Files And Modules Likely Touched
servers/engine/models.py
servers/engine/content.py
servers/engine/worldsim.py
servers/engine/server.py
viewer/server.py
viewer/openworlds/screen-map.jsx
viewer/openworlds/screen-relations.jsx
viewer/openworlds/screen-bestiary.jsx
viewer/tests/test_atlas_surface.py
viewer/tests/test_session_surface.py
State-Authority Boundary
Settlement pressure is engine-owned state/projection. Viewer/OpenWorlds may display player-known civic state and post player intent through /move, but may not write settlement pressure, faction influence, clocks, or NPC dispositions directly.
Acceptance Criteria
- Old snapshots load unchanged.
- Valid settlement content seeds deterministically.
- Malformed optional settlement blocks degrade safely with diagnostics.
- Settlement pressure advances only through engine-owned time/worldsim paths.
- Atlas/Relations/Codex expose only player-safe settlement facts.
- Hidden NPC motives, sealed agendas, private lore, and generated-source notes do not leak.
- No Eigengrau/OpenDnD prose, names, tables, or runtime dependency is imported.
- Tests cover seeding, idempotent ticks, player-known filtering, and legacy fallback.
Focused Validation Commands
uv run --directory servers/engine --group dev pytest -q tests/test_worldsim.py tests/test_content.py
python3 -m unittest viewer.tests.test_atlas_surface -q
python3 -m unittest viewer.tests.test_session_surface -q
git diff --check
Adversarial Risks
- Importing external prose/tables instead of clean-room dimensions.
- Duplicating faction state in settlements and drifting from canonical faction/worldsim truth.
- Leaking hidden NPC/faction agendas into player surfaces.
- Overbuilding generation before the read model is useful.
Original-Agent Handoff
Start with:
servers/engine/models.py
servers/engine/worldsim.py
servers/engine/content.py
viewer/server.py
viewer/openworlds/screen-map.jsx
viewer/openworlds/screen-relations.jsx
Refs #60. Related to #117, #118, #121, #143.
Summary And Gameplay Impact
Add a compact, clean-room settlement/NPC/faction pressure layer for living worlds. This gives towns, districts, factions, establishments, and notable NPCs persistent texture and pressure without asking the DM/story layer to invent every civic beat from scratch.
Current ClawDnD State
ClawDnD has world content, locations, factions, strategic clocks, Atlas, Relations/Camp, and player-known codex lanes. Issue #143 tracks rare world-gen NPC/quest variant matrices. What is missing is a typed settlement pressure model tied to locations/factions/worldsim: governance, safety, economy, unrest, faction influence, establishment hooks, notable public NPC roles, and player-known civic state.
External Source Value And Recommendation
Use
ryceg/Eigengrau-s-Essential-Establishment-Generatorandopendnd/opendndas mechanics-shape references only. Do not import generated prose, names, tables, frontend/runtime dependencies, or content. Eigengrau has useful concepts around establishments and civic texture; OpenDnD has limited lane-specific value.Architecture Plan
SettlementProfile,LocalFactionLink, andSettlementPressuremodels tied to existingLocation,Faction, and strategic state.worldsimtick unrest, faction pressure, local assets, civic clocks, and backlog suggestions through engine-owned paths.Files And Modules Likely Touched
servers/engine/models.pyservers/engine/content.pyservers/engine/worldsim.pyservers/engine/server.pyviewer/server.pyviewer/openworlds/screen-map.jsxviewer/openworlds/screen-relations.jsxviewer/openworlds/screen-bestiary.jsxviewer/tests/test_atlas_surface.pyviewer/tests/test_session_surface.pyState-Authority Boundary
Settlement pressure is engine-owned state/projection. Viewer/OpenWorlds may display player-known civic state and post player intent through
/move, but may not write settlement pressure, faction influence, clocks, or NPC dispositions directly.Acceptance Criteria
Focused Validation Commands
Adversarial Risks
Original-Agent Handoff
Start with:
servers/engine/models.pyservers/engine/worldsim.pyservers/engine/content.pyviewer/server.pyviewer/openworlds/screen-map.jsxviewer/openworlds/screen-relations.jsxRefs #60. Related to #117, #118, #121, #143.