sl-controls created pull request seb/saltylab-firmware#98

sl-controls
Sun, 01 Mar 2026 23:20:31 -0500

98#feat(social): personality system — SOUL.md persona, mood engine, relationship DB (Issue #84)#

Summary

Implements the full personality system for saltybot social interaction.

New packages

saltybot_social_msgs: PersonalityState.msg + QueryMood.srv custom interfaces

saltybot_social_personality: SOUL.md-driven personality ROS2 node

Features

SOUL.md persona file (YAML/Markdown): name, humor_level (0–10), sass_level (0–10), base_mood, per-tier greeting templates, mood prefix strings. Hot-reloaded every reload_interval seconds with no restart required.

Per-person relationship memory in SQLite: score, interaction_count, first/last_seen, learned preferences (JSON), full interaction log

Mood engine (pure functions): happy | curious | annoyed | playful driven by relationship score, interaction count, recent event window (120s)

Greeting personalisation: stranger | regular | favorite tiers keyed on threshold_regular / threshold_favorite from SOUL.md

ROS2 dynamic reconfigure: soul_file, db_path, reload_interval, publish_rate all settable at runtime via ros2 param set

52 unit tests — no ROS2 runtime required (pure-function coverage of soul_loader, mood_engine, relationship_db)

ROS2 interfaces

Direction | Topic/Service | Type
Sub | /social/person_detected | std_msgs/String (JSON)
Pub | /social/personality/state | saltybot_social_msgs/PersonalityState
Srv | /social/personality/query_mood | saltybot_social_msgs/QueryMood

Test plan

52 unit tests pass: pytest jetson/ros2_ws/src/saltybot_social_personality/test/test_personality.py

SOUL.md load/hot-reload on robot

SQLite DB persists across restarts

ros2 param set /personality_node soul_file /new/SOUL.md triggers reload

ros2 service call /social/personality/query_mood returns correct tier/mood

Closes #84.