## Phase 7: Hathor (Worldbuilding & Narrative) Migration

### 7.1 Hathor Library: Domain Models

- [x] **7.1.1** Create libs/hathor/domain-models/ project
- [x] **7.1.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.1.3** Define Faction model
- [x] **7.1.4** Define Economy model
- [x] **7.1.5** Define Law model
- [x] **7.1.6** Define Culture model
- [x] **7.1.7** Define Geography model
- [x] **7.1.8** Define Timeline model
- [x] **7.1.9** Define Character model
- [x] **7.1.10** Define Location model
- [x] **7.1.11** Ensure models are engine-agnostic (no engine SDK types)

### 7.2 Hathor Library: Narrative Systems

- [x] **7.2.1** Create libs/hathor/narrative/ project
- [x] **7.2.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.2.3** Migrate yemaya/packages/quest-dialogue
- [x] **7.2.4** Create Story Graph data structure
- [x] **7.2.5** Create Quest model and builder
- [x] **7.2.6** Create Dialogue Tree model
- [x] **7.2.7** Create Journal/Codex system
- [x] **7.2.8** Add narrative branching utilities

### 7.3 Hathor Library: Theory (Story/Cinematography)

- [x] **7.3.1** Create libs/hathor/theory/ project
- [x] **7.3.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.3.3** Migrate story-related parts of yemaya/packages/theory
- [x] **7.3.4** Create MDA framework implementation
- [x] **7.3.5** Create story structure templates (hero's journey, etc.)
- [x] **7.3.6** Add visual composition rules

### 7.4 Hathor Library: Simulation ✅

- [x] **7.4.1** Create libs/hathor/simulation/ project
- [x] **7.4.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.4.3** Create economy simulation engine
- [x] **7.4.4** Create politics simulation engine
- [x] **7.4.5** Create culture evolution simulation
- [x] **7.4.6** Create scenario generator

### 7.5 Hathor Library: Lore Compiler

- [x] **7.5.1** Create libs/hathor/lore-compiler/ project
- [x] **7.5.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.5.3** Create engine-ready artifact generator (quests)
- [x] **7.5.4** Create film-ready artifact generator (script beats, scene cards)
- [x] **7.5.5** Create interchange format for Bellona

### 7.6 Hathor Library: Validation ✅

- [x] **7.6.1** Create libs/hathor/validation/ project
- [x] **7.6.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.6.3** Create timeline consistency checker
- [x] **7.6.4** Create causality validator
- [x] **7.6.5** Create taxonomy validator
- [x] **7.6.6** Add lore contradiction detector

### 7.7 Hathor Library: Pre-Production ✅

- [x] **7.7.1** Create libs/hathor/pre-production/ project
- [x] **7.7.2** Add project.json with scope:hathor, layer:domain tags
- [x] **7.7.3** Migrate yemaya/packages/pre-production
- [x] **7.7.4** Create scriptwriting tools
- [x] **7.7.5** Create storyboarding tools
- [x] **7.7.6** Create planning utilities

### 7.8 Hathor App: World Model API

- [x] **7.8.1** Create apps/hathor/world-api/ project
- [x] **7.8.2** Add project.json with scope:hathor, type:app tags
- [x] **7.8.3** Create world state CRUD endpoints
- [x] **7.8.4** Create versioning endpoints
- [x] **7.8.5** Create world query endpoints
- [x] **7.8.6** Add diff/merge utilities for collaborative editing

### 7.9 Hathor App: Narrative API ✅

- [x] **7.9.1** Create apps/hathor/narrative-api/ project
- [x] **7.9.2** Add project.json with scope:hathor, type:app tags
- [x] **7.9.3** Create story graph endpoints
- [x] **7.9.4** Create quest CRUD endpoints
- [x] **7.9.5** Create dialogue tree endpoints
- [x] **7.9.6** Add constraint validation endpoints

### 7.10 Hathor App: Simulation Workers ✅

- [x] **7.10.1** Create apps/hathor/simulation-worker/ project
- [x] **7.10.2** Add project.json with scope:hathor, type:app tags
- [x] **7.10.3** Create economy simulation worker
- [x] **7.10.4** Create politics simulation worker
- [x] **7.10.5** Create culture simulation worker
- [x] **7.10.6** Create scenario generation worker

### 7.11 Hathor App: Worldbuilding Workbench ✅

- [x] **7.11.1** Create apps/hathor/workbench/ project
- [x] **7.11.2** Add project.json with scope:hathor, type:app tags
- [x] **7.11.3** Create world editor UI
- [x] **7.11.4** Create timeline visualization
- [x] **7.11.5** Create faction relationship graph UI

### 7.12 Hathor Client SDK

- [x] **7.12.1** Create libs/hathor/client/ project
- [x] **7.12.2** Add project.json with scope:hathor, layer:clients tags
- [x] **7.12.3** Generate TypeScript client from OpenAPI
- [x] **7.12.4** Create @oshun/hathor-client package
- [x] **7.12.5** Add world state helpers
- [x] **7.12.6** Add quest generation helpers
- [x] **7.12.7** Add lore validation helpers

### 7.13 Hathor Database Schema

- [x] **7.13.1** Create libs/hathor/database/ project
- [x] **7.13.2** Add project.json with scope:hathor, layer:data tags
- [x] **7.13.3** Define Prisma schema for Hathor:
  - [x] World model
  - [x] WorldVersion model
  - [x] Faction model
  - [x] Character model
  - [x] Location model
  - [x] Timeline model
  - [x] Quest model
  - [x] DialogueTree model
  - [x] SimulationRun model
- [x] **7.13.4** Create migrations (local dev environment setup completed)
- [x] **7.13.5** Add seed data

### 7.14 Integration with Sophia

- [x] **7.14.1** Create Hathor → Sophia citation integration
- [x] **7.14.2** Add research grounding for world facts
- [x] **7.14.3** Create lore fact-checking against research

### 7.15 Migration from Lilith

- [x] **7.15.1** Audit lilith/services/veilborn-core for Hathor migration
- [x] **7.15.2** Audit lilith/services/veilborn-strategy for Hathor migration
- [x] **7.15.3** Plan migration of Veilborn Chronicles to Hathor
- [x] **7.15.4** Create migration scripts for existing world data

---

