Allows resetting the LLM stats aggregation window without deleting
historical data. Stores a reset timestamp in metadata and filters
the aggregation query to only include calls after that point.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix inverted guard logic (napTarget < 60 triggers full sleep, not >=),
add cycleTicks derivation, clamp napTarget to 100, add test plan.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD-structured plan covering thirst need, berry bushes, hunger rework,
forage goal, UI bars, and food POI removal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Berry bushes as gatherable food, thirst need consuming water items,
productivity bar on status tab, desperate forage goal, remove magic
food POIs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Motivation layer giving NPCs personal desires (0-3 per NPC) that
drive crafting priorities, influence invention, and create emergent
stories. Hybrid LLM approach: traits at spawn + event-driven updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ensureDefaultStockpiles() to handle saves from before stockpile spawning
- Switch backstory prompt stat formatting from abbreviations (STR, DEX) to
full names (strength, dexterity) for better LLM comprehension
- Add prior design/plan docs for LLM fallback and NPC sleep system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NPCs never drop off gathered resources due to missing continue
statement in npcBrainSystem. Design adds strength-based carry
capacity and fixes dropoff goal priority.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 tasks covering: load-time re-registration fix, reasoning field
parsing, revised LLM prompt, full stat passthrough, token usage
tracking, race condition guard, and integration tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark all resource system phases (A, B, C, D.1-D.3) as complete in
the LLM integration roadmap and design docs. D.4 (structure
inspection) remains as future work.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- D.1: Inventory display in NPC info panel (two-column grid below stats)
- D.2: Activity labels for gather/craft/build/dropoff goals
- D.3: Gold color for invention events in feed, lightbulb icon in history
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>
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>
- Add trunk decoration layer to GameMap and mapGenerator
- Load trunk.png asset in BootScene
- Increase superlatives panel size and font sizes for readability
- Simplify mapGenerator (remove procedural terrain features)
- Add LLM integration planning documents
- Remove stale day-night cycle worktree plans
- Update local Claude settings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12-task TDD plan covering bond registry, proposal interactions,
classification rework, config additions, and client display updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>