## Phase 11: Cross-Domain Integration

### 11.1 Event Bus Setup

- [x] **11.1.1** Choose event broker (Kafka, RabbitMQ, Redis Streams, or
      cloud-native)
- [x] **11.1.2** Create @oshun/event-bus library
- [x] **11.1.3** Implement event publisher
- [x] **11.1.4** Implement event consumer
- [x] **11.1.5** Add dead letter queue handling
- [x] **11.1.6** Add event replay utilities

### 11.2 Cross-Domain Event Subscriptions

- [x] **11.2.1** Yemaya subscribes to isis.assetGenerated
- [x] **11.2.2** Yemaya subscribes to isis.jobFailed
- [x] **11.2.3** Yemaya subscribes to sophia.documentIngested
- [x] **11.2.4** Yemaya subscribes to hathor.worldPublished
- [x] **11.2.5** Yemaya subscribes to bellona.buildCompleted
- [x] **11.2.6** Yemaya subscribes to bellona.exportReady
- [x] **11.2.7** Lilith subscribes to isis.assetGenerated (for content)
- [x] **11.2.8** Lilith subscribes to sophia.indexUpdated (for search)
- [x] **11.2.9** Hathor subscribes to sophia.documentIngested (for research
      grounding)
- [x] **11.2.10** Bellona subscribes to hathor.worldPublished (for engine sync)
- [x] **11.2.11** Bellona subscribes to isis.assetGenerated (for asset pipeline)

### 11.3 Service Discovery

- [x] **11.3.1** Create @oshun/service-discovery library
- [x] **11.3.2** Configure service registry (Consul, K8s DNS, or cloud-native)
- [x] **11.3.3** Add health check integration
- [x] **11.3.4** Add load balancing configuration

### 11.4 API Gateway / Reverse Proxy

- [x] **11.4.1** Decide gateway approach (Kong, Envoy, Traefik, or custom)
- [x] **11.4.2** Configure routing to capability domains
- [x] **11.4.3** Add authentication/authorization at gateway
- [x] **11.4.4** Add rate limiting at gateway
- [x] **11.4.5** Add request tracing propagation

### 11.5 Shared Identity & Authentication

- [x] **11.5.1** Create @oshun/identity library for shared auth primitives
- [x] **11.5.2** Define JWT claims structure for cross-domain auth
- [x] **11.5.3** Create token validation middleware for each domain
- [x] **11.5.4** Add service-to-service auth (API keys or mTLS)
- [x] **11.5.5** Document auth flow between domains

### 11.6 Data Migration Between Domains

- [x] **11.6.1** Create migration scripts for Lilith RAG → Sophia
- [x] **11.6.2** Create migration scripts for Lilith ingestion → Sophia
- [x] **11.6.3** Create migration scripts for Yemaya engine data → Bellona
- [x] **11.6.4** Create migration scripts for Yemaya generation data → Isis
- [x] **11.6.5** Validate data integrity after migration
- [x] **11.6.6** Update foreign key references to API calls

---

