> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strategist.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Data model

# Strategist Data Architecture Reference

## Complete 11-Table Strategic Intelligence System

**AI-optimized data architecture** for transforming life events into strategic intelligence through game theory analysis.

***

## User Management (4 Tables)

### `user_profiles` - **Strategic Identity Hub**

**Core player identity and personalization engine**

* **Strategic Archetype** - Main Character, Side Character, NPC classification
* **Personal Configuration** - Health conditions, goals, preferences via JSONB
* **Location Intelligence** - Timezone, location for contextual strategic analysis
* **Notification Strategy** - Customized engagement patterns

### `user_progression` - **Strategic Progress Tracking**

**Long-term strategic development and skill evolution**

* **Archetype Progress** - Progression within chosen strategic identity (1-100)
* **Strategic Skills** - Game theory understanding, pattern recognition, agent coordination
* **Life Optimization Score** - Overall strategic effectiveness measurement
* **Development Velocity** - Rate of strategic improvement and learning

### `user_domains` - **Dynamic Life Organization**

**Flexible life domain system beyond 10 core areas**

* **10 Core Domains** - Health, relationships, finances, career, etc. (auto-created)
* **Custom Domains** - User-defined life areas (creativity, spirituality, etc.)
* **Agent Impact Scoring** - How each domain affects the 4 internal agents
* **Priority Weighting** - Strategic importance for personalized optimization

### `user_questions` - **Adaptive Strategic Assessment**

**AI-generated personalized questioning system**

* **Dynamic Question Generation** - AI creates strategic queries based on user patterns
* **Session-Based Delivery** - Morning, afternoon, evening strategic check-ins
* **Effectiveness Tracking** - Questions improve based on user engagement and outcomes
* **Strategic Intelligence Gathering** - Targeted data collection for optimization

***

## Agent System (2 Tables)

### `internal_agents` - **4-Agent Strategic Council**

**Individual agent profiles and decision-making patterns**

* **4 Agent Types** - Optimizer (efficiency), Protector (security), Explorer (growth), Connector (relationships)
* **Strength & Satisfaction** - Current state and fulfillment levels
* **Decision Patterns** - AI-learned strategic preferences and successful approaches
* **Conflict Triggers** - Situations that create internal strategic conflicts

### `daily_coordination` - **Strategic Resource Allocation**

**Daily agent balance and harmony management**

* **Energy Distribution** - Percentage allocation across 4 agents (must sum to 100%)
* **Dominant Agent** - Primary strategic focus for the day
* **Conflict Resolution** - How strategic disagreements between agents are resolved
* **Harmony Scoring** - Overall strategic alignment and effectiveness

***

## External World (3 Tables)

### `external_players` - **Strategic Entity Network**

**People, behaviors, and institutions in strategic landscape**

* **Entity Types** - People, behaviors (addictions, habits), institutions, environments
* **Relationship Status** - Allied, neutral, adversarial strategic classification
* **Influence Mapping** - Strategic importance, trust levels, predictability scores
* **Game Theory Data** - Strategic patterns, known tactics, counter-strategies

### `life_events` - **Strategic Input Processing**

**Raw life experiences transformed into strategic intelligence**

* **Natural Language Input** - Conversational life event capture
* **AI Enhancement** - Structured categorization and strategic analysis
* **Multi-dimensional Impact** - Health, energy, mood, strategic significance scoring
* **Agent Coordination** - Which internal agents are affected and how

### `status_objects` - **Strategic Objectives Management**

**Active goals, projects, habits, and milestones**

* **Object Types** - Goals, projects, habits, milestones, routines
* **Agent Assignment** - Primary agent responsible plus supporting agents
* **Strategic Importance** - Priority and significance in overall life strategy
* **Progress Tracking** - Completion percentage and target dates

***

## Intelligence & Gamification (2 Tables)

### `ai_analysis` - **Strategic Intelligence Engine**

**Multi-dimensional strategic analysis and recommendations**

* **Analysis Types** - Daily summaries, pattern recognition, conflict resolution, crisis intervention
* **Strategic Insights** - Key patterns, risk factors, opportunities identification
* **Game Theory Analysis** - Nash equilibrium solutions, player interaction analysis
* **Agent Coordination** - Conflict detection and recommended strategic adjustments

### `strategic_achievements` - **Life Progress Recognition**

**Evidence-based milestone system with experience points**

* **Achievement Categories** - Strategic thinking, life optimization, agent coordination
* **Evidence Tracking** - Life events and decisions that demonstrate strategic progress
* **Experience System** - Gamified progression with difficulty-based point allocation
* **Strategic Significance** - How achievements contribute to overall life strategy

***

## Key Design Patterns

### **JSONB Everywhere**

```sql theme={null}
custom_config JSONB     -- User-defined settings
properties JSONB        -- Object-specific strategic data
decision_patterns JSONB -- AI-learned patterns
game_theory_data JSONB  -- Strategic analysis results
```

### **AI-Optimized Constraints**

```sql theme={null}
-- Standardized scales for consistent AI processing
satisfaction INTEGER CHECK (1 <= satisfaction <= 10)
relationship_status CHECK (status IN ('allied', 'neutral', 'adversarial'))
archetype CHECK (archetype IN ('main_character', 'side_character', 'npc'))
```

### **Strategic Intelligence Flow**

```
Raw Input → AI Analysis → Structured Data → Strategic Action
life_events → ai_analysis → status_objects → strategic_achievements
```

### **User Isolation & Scalability**

* All tables partitioned by `user_id` for complete data isolation
* Infinite user scaling without cross-contamination
* Personalized AI intelligence per user strategic profile

***

## Evolution Roadmap

### **Phase 1: Current SQL Foundation**

Proven relational model with JSONB flexibility for AI processing

### **Phase 2: Neo4j Graph Integration**

Strategic relationship mapping and influence network analysis

### **Phase 3: Vector Intelligence**

Semantic strategic pattern recognition and predictive modeling

***

**Every table designed as both human-usable data storage and AI-optimized intelligence substrate for continuous strategic learning and optimization.**
