Adds resource generation (water ponds, stone deposits, trees), NPC gathering
behavior driven by a new productivity need, inventory system, and client-side
stone tile rendering. 304 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Stone tiles now display as gray rectangles with darker borders instead of
being hidden under the base grass layer. Also treats stone as a land tile
for water edge autotiling so water/stone boundaries render correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Break the monolithic 2.2 design into Phases A-D that can each be
implemented in a separate session with cleared context. Each phase
section is self-contained with all needed specs and file references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Events recorded with tick: 0 now get a meaningful tick value from the
service's internal counter, ensuring selectForPrompt recency scoring
works correctly. Also fixed preferTypes to accept readonly arrays.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When narrating social interactions, the LLM now receives up to 3 shared
history events between the two NPCs, enabling more contextual narrations
that reference past encounters.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the simple last-2-narration-events approach with smart selection
of up to 5 memory events, preferring types relevant to the thought trigger
(social events for post-interaction, need events for need-critical).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire SocketClient to receive memory-event and memory-history socket
events. GameScene stores per-NPC memory events and updates the info
panel in follow mode. NpcInfoPanel gains a third "History" tab showing
a reverse-chronological event log with emoji icons per event type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- determineTrigger now detects post_interaction (recent social outcome),
need_critical, idle (wandering), and periodic triggers
- Track active emoji per NPC, destroy previous before showing new one
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Design for LLM-driven emergent crafting and invention system.
NPCs gather resources from terrain, craft at workshops, and
occasionally have eureka moments where an LLM invents new items.
Updates LLM roadmap: this becomes item 2.2, old goal selection
splits into 2.5 (POI naming).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements LLM-powered narration for NPC social interactions:
- Rate limits updated to 20 RPM / 1000 per day (OpenRouter free tier)
- NarrationEvent type with template fallback text generator
- NarrationService with rolling event buffer and LLM priority queuing
- Narration emitter wired between social and relationship systems
- Socket.io events for real-time narration delivery
- Tabbed left panel (Stats + Events) replacing old Superlatives panel
- Recent events section in NPC info panel
- Follow tracking via socket for LLM narration priority
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restore subscribeSuperlatives/unsubscribeSuperlatives/onSuperlativesUpdate
on SocketClient (lost during Task 5 refactor)
- Fix EventsFeed.updateEvent to rebuild entire element when LLM narration
arrives (names may be in different positions)
- Remove dead setFollowedEntity method from GameLoop (replaced by
SocketServer.rebuildFollowedEntityIds)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds follow-npc client event so the server knows which NPCs are being
watched, enabling priority LLM narration for followed entity interactions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>