Commit Graph
936 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.6 1ead61ce99 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:20:21 +01:00
jpmschweitzerandClaude Opus 4.6 a862426f84 docs(docs): add Sprint 22 briefings and track Godot auto-generated files
Sprint 22 "Wire" briefings for server, client, visual, CI, and
planning teams. Also track Godot .import and .uid files that were
previously untracked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:20:02 +01:00
jpmschweitzerandClaude Opus 4.6 d4f81e9373 docs(docs): update D-015/D-017 for simplified cone model, add Q-051
Update perception decisions to reflect the forward-only 120° cone
(no peripheral sector). Add Q-051: speech bubble indicator over
speaking NPCs for dialogue attribution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:19:48 +01:00
jpmschweitzerandClaude Opus 4.6 1edc8bb1ec refactor(client): simplify fog shader to 3-layer model
Reduce from 5-layer to 3-layer fog: clear (forward cone), explored
(light overlay preserving art), and unexplored (solid near-black).
Remove peripheral sector handling from fog_state.gd.

Also preserve exploration data across texture resizes — previously,
resizing the fog texture lost all explored-tile state, causing tiles
behind the player to render as unexplored black instead of light fog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:19:44 +01:00
jpmschweitzerandClaude Opus 4.6 2016e9a725 refactor(simulation): simplify vision cone to forward-only 120° arc
Remove the peripheral sector (100° half-angle, reduced range) and blind
spot classification. The server now sends only tiles within the 120°
forward cone; the client renders previously-explored tiles behind the
player with a light fog overlay instead.

This eliminates complexity in both the cone classifier and the snapshot
protocol while preserving the core information asymmetry — you still
can't see behind you, and the monologue system (D-016) still bridges
the perceptual gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:19:38 +01:00
jpmschweitzerandClaude Opus 4.6 0bb38dd3d9 chore(db): update database backup after planning merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:18:47 +01:00
jpmschweitzer 72fb8ff987 Merge remote-tracking branch 'origin/planning' 2026-02-28 12:18:37 +01:00
jpmschweitzerandClaude Opus 4.6 a69e69e663 feat(perception): ground vision cone in human sensory physiology
- Visible half-angle 150° → 100° (200° arc), matching average human
  binocular field. Blind spot widens from 60° to 160° — genuine
  vulnerability behind the character.
- Forward half-angle stays at 60° (120° arc) — binocular overlap zone.
- Peripheral zone represents combined sensory awareness: visual
  periphery + subconscious sound/motion tracking, not just eyes.
- Per-character VisionConeConfig allows implants and perception modes
  (D-017) to widen beyond the unaugmented baseline.
- Fog shader: smooth back-edge gradient via smoothstep blend between
  Layer 2 (peripheral) and Layer 3 (deep fog), eliminating blocky
  stair-stepped tiles at the rear of the vision cone.
- D-015 updated with physiological basis and per-character config.
- D-017 updated with vision cone modification by perception modes.
- D-020 updated with protocol versioning policy: PROTOCOL_VERSION
  gates wire format, not gameplay parameters.
- DB backup after sprint 21 close.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:31:29 +01:00
jpmschweitzer dd0de2ff04 Merge remote-tracking branch 'origin/visual' 2026-02-27 21:50:36 +01:00
jpmschweitzerandClaude Opus 4.6 e28be513cd fix(assets): review fixes — fog noise speed and kernel UV clamping
Deep fog noise scroll speed 0.045/0.03 → 0.06/0.045 to match D-059
15-20s breathing cycle spec. Clamp sample_visibility() UV coordinates
to [0,1] to prevent sticky gradient at map edges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 21:48:39 +01:00
jpmschweitzerandClaude Opus 4.6 93c9d2dcb4 fix(client): bump protocol version to 17 after server merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 21:36:32 +01:00
jpmschweitzerandClaude Opus 4.6 df1d9c8990 fix(assets): add Gaussian blur to fog visibility for soft cone edge
The visibility texture has binary per-tile values (0/180/255) — bilinear
filtering alone only smooths ~1 tile, producing hard stair-stepped edges
at the LOS boundary instead of the 6-8 sim tile gradient D-059 specifies.

Add sample_visibility() with 7x7 Gaussian kernel (sigma 2.0) that
spreads the LOS boundary into a 3-4 tile radius gradient. Lower
PERIPHERAL_LOW from 0.55 to 0.08 so gradient tiles enter the peripheral
fog branch. Fix Layer 1/2 alpha discontinuity at CLEAR_THRESHOLD.
Guard against gradient bleed into unexplored tiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 19:40:49 +01:00
jpmschweitzerandClaude Opus 4.6 8934a8201d fix(assets): tune fog shader alpha and clean cone edge per D-059
Layer 2 (peripheral): reduce peak alpha 0.55→0.38, noise 0.1→0.05,
taper noise to zero near clear boundary for a clean gradient edge.
Layer 3 (deep fog): reduce alpha range 0.78-0.90→0.62-0.76 so zone
temperature tint breathes through. Layer 5 unchanged (alpha 1.0).

Ticket: #564

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 19:33:47 +01:00
jpmschweitzer bb91b0acf0 Merge remote-tracking branch 'origin/main' into visual
# Conflicts:
#	docs/design/wireframes/menus/v01-save-load.png
2026-02-27 19:29:17 +01:00
jpmschweitzer d170362d1f Merge remote-tracking branch 'origin/server' 2026-02-27 19:24:42 +01:00
jpmschweitzerandClaude Opus 4.6 dd00a9cd9e fix(simulation): address PR #75 review — vision components, triangle validation, FNV-1a, KG gating
1. CRITICAL: spawn_template_npcs now inserts NpcVisionState, NpcMemory,
   PlayerAwareness on template-spawned NPCs — matches spawn_npc() pattern
   from PR #66. Without these, template NPCs were invisible to vision and
   awareness systems.

2. WARNING: generate_intra_template_triangles now calls validate_triangle_def
   before generating TriangleState — mirrors cross-template path. Updates
   test TriangleDefs and logistics-hub.yaml to pass all three quality checks
   (conflict viability, relationship coherence, interest divergence).

3. WARNING: state_hash in compute_observer_snapshot now uses FNV-1a instead
   of DefaultHasher — consistent with D-010 principle 4 and the pattern in
   TemplateId/TriangleId. Updates golden file for new hash value.

4. WARNING: TriangleCrisisEventWire.role_assignments now filtered against
   observer KnowledgeGraph — unknown NPCs redacted from wire event per
   D-010 principle 2 (information boundaries).

5. WARNING: ActiveTemplateInstances::insert now despawns previous instance
   entities before overwriting — prevents orphaned ECS entities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 19:02:43 +01:00
jpmschweitzer b47d53f6e5 Merge remote-tracking branch 'origin/ci' 2026-02-27 18:57:06 +01:00
jpmschweitzerandClaude Opus 4.6 394742ee98 fix(ci): add missing db/connectors/audio-batch permission
Parity fix from PR #74 re-review round 2: legacy permission block
was missing audio-batch entry that exists in the tooling/db/ block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 18:54:21 +01:00
jpmschweitzerandClaude Opus 4.6 64bf4ec539 fix(client): address PR #73 review — race conditions and defensive guards (#257)
- Defer LOAD_GAME dispatch until SimBridge reaches CONNECTED (critical)
- Guard _build_saves_list() against queue_free() race on rapid reopen
- Disable save entries with empty newest_save, guard in _on_save_selected
- Send before show_loading on F6 quickload, skip overlay on send failure
- Clear pending_load_path in _on_new_game()/_on_continue() (stale path)
- Add hide_loading(success: bool) API for future failure-state UI
- Add test_save_load_flow_sprint21.gd covering LoadingScreen + GameState

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 18:06:16 +01:00
jpmschweitzerandClaude Opus 4.6 88fc6c30dc feat(simulation): template instantiation engine — load, spawn, lifecycle (#161)
Add content::instantiation module with:
- instantiate_template(): validates FullTemplateDef, calls
  spawn_template_npcs, generates TriangleState entities with ActiveSim,
  registers in ActiveTemplateInstances resource
- unload_template(): despawns all NPC + triangle entities, removes
  from tracking
- load_template_from_file(): YAML → FullTemplateDef deserialization
- ActiveTemplateInstances: BTreeMap-backed resource (D-010 determinism)

Integration tests: end-to-end logistics-hub.yaml instantiation (4 NPCs,
2 TriangleStates), lifecycle (instantiate → unload → clean), determinism
(same seed = same layout), error path (missing file).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:59:49 +01:00
jpmschweitzerandClaude Opus 4.6 b6340f9663 fix(simulation): clean up warnings in spawn and template modules (#166)
Remove duplicate #[test] attribute, unused TemplateId import, and dead
spawn_escalation_npc helper function (no longer referenced after #250
refactor).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:59:38 +01:00
jpmschweitzerandClaude Opus 4.6 ccff595101 fix(ci): address PR #74 review comments
Add missing db/connectors/decision permission in settings.json and
update DEVOPS.md layout table to reflect connector move. Filed #568
for Sprint 22 symlink removal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:51:09 +01:00
jpmschweitzerandClaude Opus 4.6 ace5cb811f wip(simulation): template-to-instance mapping — spawn_template_npcs (#166)
Add spawn_template_npcs: three-phase template instantiation (spawn NPCs
per role slot, wire intra-template relationships, record cross-template
references in TemplateReferenceMap). Partially complete — needs
validation pass, error handling, and integration with content loading
pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:46:47 +01:00
jpmschweitzerandClaude Opus 4.6 6f39df884c feat(simulation): tier 2 template definition format — FullTemplateDef with tests (#159)
Add FullTemplateDef integration tests: round-trip YAML serialization,
space spec validation, routine schedule, sightline zones, dialogue pool
refs, cross-template link specs, and logistics-hub template fixture.
Tests cover the full social site template document structure per D-023,
D-024, D-025, D-028.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:46:37 +01:00
jpmschweitzerandClaude Opus 4.6 d31ac1cc70 feat(simulation): error handling and recovery — panic supervision, state hash, structured errors (#85)
Protocol v17: add state_hash (desync detection) and sim_errors
(structured error reporting) to ObserverSnapshot. Add SimError,
SimErrorKind, SimErrorBuffer types. Wrap main loop app.update() in
catch_unwind — on panic, send a final SimError snapshot before exit.
Report recoverable deserialization errors to client via SimErrorBuffer.
Compute per-tick state hash from player position + NPC count + tick.
Update all test fixtures and golden files for protocol v17.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:46:27 +01:00
jpmschweitzerandClaude Opus 4.6 c2cae1f618 fix(simulation): register interaction systems and persist door state (#246)
Follow-up to b6a9b78: register TerminalInteractedQueue resource and
door/terminal interaction systems in SimulationPlugin; add door state
save/load in save_io (open doors round-trip through SaveStateV1);
make WalkabilityMap param optional in process_door_interaction so
plugin-only tests work without a loaded map; fix information_boundaries
test missing open_doors field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:46:15 +01:00
jpmschweitzerandClaude Sonnet 4.6 b6a9b78205 feat(simulation): basic environmental interaction — doors, examine, terminals (#246)
- Add DoorState component tracking is_open and blocking_tile; add
  DoorInteractRequest per-player component consumed by new
  process_door_interaction system (toggles walkability each use)
- Add TerminalInteracted event, TerminalInteractedQueue resource,
  TerminalInteractRequest component, and process_terminal_interaction
  system (emits event on Use verb)
- Add ExamineText(String) component for authored object examine text;
  extend process_examine_interaction with object examine path:
  uses ExamineText if present, falls back to generic string if absent
- Fix: add Without<ObjectType> filter to npc_query in
  process_examine_interaction — previously any entity with TilePosition
  was mis-routed through the NPC text generator
- Add SaveStateV1.open_doors: Vec<StableId> with #[serde(default)]
  for backward-compatible serialization
- Add "Open"/"Close" → DoorInteractRequest and "Use" →
  TerminalInteractRequest dispatch in process_player_input
- 10 integration tests in tests/environmental_interaction.rs covering
  all acceptance criteria: door toggle (both directions), open-to-close,
  invalid target, readable examine (with/without ExamineText), out-of-range,
  terminal event emission, request cleanup, and save state round-trip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 11:11:45 +01:00
jpmschweitzerandClaude Sonnet 4.6 c4e09bff77 feat(simulation): implement triangle validation and cross-template generation (#108, #109)
- Add ValidationError enum with three failure modes: ConflictViability
  (missing Want axis), RelationshipCoherence (empty constraints),
  InterestDivergence (duplicate interest axes)
- Add validate_triangle_def() pure function enforcing all three checks
  in priority order (per D-087)
- Add generate_cross_template_triangles() function that combines NPC
  pools from two templates, validates each TriangleDef before processing,
  and assigns ownership to template_a
- 10 integration tests in tests/triangle_validation.rs covering all
  validation failure modes, ordering guarantees, cross-template span,
  invalid def skipping, determinism, and intra-template isolation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 11:11:31 +01:00
jpmschweitzerandClaude Opus 4.6 0ab81961dc chore(meta): sync Cargo.lock version after main merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 11:09:39 +01:00
jpmschweitzerandClaude Opus 4.6 2893366a6f chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 11:08:35 +01:00
jpmschweitzerandClaude Opus 4.6 bc226d8baf chore(db): move db/connectors/ to tooling/db/ (#274)
Consolidates all connector scripts under tooling/ per project
structure conventions. Symlink at db/connectors → tooling/db/
preserves backwards compatibility (remove after Sprint 22).

Updated references in CLAUDE.md, Makefile, DEVOPS.md, all skill
files, agent files, rules, schema comments, and Sprint 21
briefings. Python scripts updated with correct SCHEMA_PATH
(now relative to WORKTREE_ROOT/db/schema.sql).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 11:08:00 +01:00
jpmschweitzerandClaude Opus 4.6 a44a1081bc docs(docs): record D-110–D-112 — z-level addressing, subterranean architecture, no instancing
Signed z-level fix (base_z u8→i8), MobileChunk Idle as stationary
installation primitive, and rejection of separate location instancing.
LocalOverlay confirmed as canonical DLC/mod content injection point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 11:07:13 +01:00
jpmschweitzerandClaude Opus 4.6 c797869503 feat(client): add save/load game flow and move debug_overlay (#257, #561)
#257: Add Load Game screen to main menu with sorted save list, loading
overlay during quickload round-trip, and pending_load_path cross-scene
flow. F5/F6 quicksave/quickload were already wired.

#561: Move debug_overlay.gd from scripts/ui/ to ui/ for consistency
with all other UI components. Update scene and test references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 11:07:10 +01:00
jpmschweitzerandClaude Opus 4.6 93e050f3bf chore(db): backup database after sprint 21 merges
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 10:46:44 +01:00
jpmschweitzer d8497962c6 Merge branch 'planning' 2026-02-27 10:46:33 +01:00
jpmschweitzer c69290e7a0 Merge branch 'maintenance' 2026-02-27 10:46:15 +01:00
jpmschweitzerandClaude Opus 4.6 2f2f8eb06d docs(docs): file D-096–D-109 and Q-045–Q-050 from generator workshop
14 confirmed decisions filed across architecture.md (10) and content.md (4).
6 open questions filed in questions.md (Q-046 resolved immediately by D-108).
README.md index updated.

Key decisions: DistrictLayoutMode (D-096), guarantee tier system (D-097),
MobileChunk spec (D-108), DamageOverlay prohibition (D-109), WorldTier
enum with corrected constraint ceilings, heritage grammar overlay (D-104).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 10:40:15 +01:00
jpmschweitzerandClaude Opus 4.6 bfbe0d1b44 docs(docs): generator architecture workshop — 5 rounds, 14 D-records
Complete workshop output for ticket #562. Establishes the procedural
generator pipeline architecture for the 300-world model: two-phase
generation (DistrictSkeleton + ChunkData), three-layer model
(generator/simulation/delta), spatial hierarchy, MobileChunk spec,
guarantee tier system, heritage grammar overlay, and damage overlay.

Participants: Gestalt, Tyre, Miri, Araminta, Nigel, Ozzie.
Rounds 1-4 (design) + Round 5 (review/corrections).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 10:40:02 +01:00
jpmschweitzerandClaude Opus 4.6 9332447c33 chore(sprints): add sprint 21 "Instantiate" briefings
12 tickets across 5 teams: server (7), client (2), visual (1),
ci (1), planning (1). Template instantiation pipeline, cross-template
triangles, save/load flow, fog shader tuning, generator workshop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:31:45 +01:00
jpmschweitzerandClaude Opus 4.6 9b6a3576a2 fix(meta): update paths after projects dir relocation
Replaced /var/home/jeroenschweitzer/Projects/ with /var/mnt/data/projects/
across 13 files (skills, docs, workshops, discussions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:49:24 +01:00
jpmschweitzerandClaude Opus 4.6 be72cccb2a fix(client): bump protocol version to 16
Match server v16 protocol (triangle crisis events on ObserverSnapshot).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:53:37 +01:00
jpmschweitzerandClaude Opus 4.6 615c3a9c17 chore(meta): release v0.1.20
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.1.20
2026-02-25 23:52:38 +01:00
jpmschweitzerandClaude Opus 4.6 c8a0f1b327 chore(db): backup database after sprint 20 merges
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:51:51 +01:00
jpmschweitzer 3c634a937d Merge remote-tracking branch 'origin/server' 2026-02-25 23:50:56 +01:00
jpmschweitzerandClaude Opus 4.6 4ef1157b79 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:35:35 +01:00
jpmschweitzerandClaude Opus 4.6 d808d95659 refactor(simulation): address PR #72 review suggestions
- Hoshe #3: replace O(n²) Vec scan in fallback NPC assignment with
  BTreeSet; prevent same NPC assigned to two roles in one triangle
- Hoshe #4: add From impls for RoleId, TriangleId, StableId, and
  TriangleCrisisEventWire — eliminate fragile .0 access on newtypes
- Hoshe #5: consolidate near-identical unit tests with integration
  counterparts — keep only unique tests in #[cfg(test)] module
- Tyre #3: replace O(N*M) scan in apply_resolve_triangle with
  BTreeMap<TriangleId, Entity> index for O(1) per-command lookup
- Tyre #4: document &mut World on generate_intra_template_triangles
- Observer snapshot uses TriangleCrisisEventWire::from instead of
  manual field mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:35:23 +01:00
jpmschweitzerandClaude Opus 4.6 3a555a2eeb fix(simulation): validate dangling with_role in TriangleDef constraints
TriangleDef.validate() now rejects relationship constraints where
with_role references a role not in the triangle's three roles.
Catches authoring errors at load time instead of silently producing
broken constraint data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:48:23 +01:00
jpmschweitzerandClaude Opus 4.6 1ea3d9c724 fix(simulation): persist TriangleState in SaveStateV1
Triangle phase and tension were silently lost on save/load. Now
serialized as triangle_states vec in SaveStateV1, sorted by
triangle_id for determinism (D-010). Dedicated triangle entities
are respawned on load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:48:18 +01:00
jpmschweitzerandClaude Opus 4.6 9bc5925220 fix(simulation): wire triangle crisis event queue into observer snapshot
The TriangleCrisisEventQueue was populated by tick_triangle_escalation
but never drained into ObserverSnapshot — clients always saw an empty
vec despite protocol v16 advertising the field. Now drains the queue
each tick and converts to TriangleCrisisEventWire.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:48:11 +01:00
jpmschweitzerandClaude Opus 4.6 d34fc970a7 feat(simulation): add triangle escalation integration tests
16 tests covering escalation timing, crisis event emission,
resolve command, D-087 seed-dependent timing, D-089 no-cascade,
and edge cases (dormant skip, saturation, idempotent resolve).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:34:27 +01:00