feat(simulation): interaction tracking + trust progression (#325, #324)

InteractionMemory component tracks interaction_count, last_interaction_tick,
and notable_events per NPC. Drives D-028 Layer 2 situation activation:
first_meeting (count==0) and repeated_visit (count>=3). warm_active in mood
system now derives from InteractionMemory within a 300-tick window.

Trust progression wired into dialogue systems: talk completion (+1),
walk-away (-1), confrontation (-2) emit TrustEvents consumed by update_trust.
InteractionEvent (WalkAway, Confrontation) recorded in notable_events for
fast per-pair access.

Adds FirstMeeting and RepeatedVisit Situation variants. 18 unit tests in
interaction.rs. All arithmetic integer-only (D-010 determinism). No HashMap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 18:52:23 +01:00
co-authored by Claude Sonnet 4.6
parent a14c980aad
commit dcd15a330f
7 changed files with 338 additions and 9 deletions
+2
View File
@@ -596,6 +596,8 @@ fn situation_str(s: &Situation) -> &'static str {
Situation::Emergency => "emergency",
Situation::Routine => "routine",
Situation::Observation => "observation",
Situation::FirstMeeting => "first_meeting",
Situation::RepeatedVisit => "repeated_visit",
}
}