Add multi-tag personality archetype system

Replace single first-match archetype with comprehensive multi-tag system
spanning 25 archetypes across 8 categories (Communication, Temporal,
Emotional, Economy, Games, Adventure, Social). Archetypes are computed
nightly via cron job querying 15+ tables and cached in user_archetypes.
Thresholds calibrated against real community data. Integrates with
!personality, !superstatsexplusalpha, !whois, and milk carton flavor text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-30 17:11:45 -07:00
parent 06153880e0
commit 2c6f4e48c9
7 changed files with 920 additions and 128 deletions

View File

@@ -1081,6 +1081,18 @@ CREATE TABLE IF NOT EXISTS market_daily_summary (
generated_at INTEGER
);
-- Archetype cache (recalculated nightly)
CREATE TABLE IF NOT EXISTS user_archetypes (
user_id TEXT NOT NULL,
archetype TEXT NOT NULL,
category TEXT NOT NULL DEFAULT '',
signal_score REAL NOT NULL DEFAULT 0,
flavor TEXT NOT NULL DEFAULT '',
assigned_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (user_id, archetype)
);
CREATE INDEX IF NOT EXISTS idx_user_archetypes_user ON user_archetypes(user_id, signal_score DESC);
`
// SeedSchedulerDefaults inserts default scheduler jobs if they don't exist.