# @nous/wm-integration

Wires the Phase 176 world models into Galatea robotics and Hathor / iris agent
cognition (Phase 176.7). Built on the `@nous/world-model-core` `WorldModel`
interface, so any learned simulator (Dreamer RSSM, MuZero, Genie, DIAMOND) drops
in.

- **`SafetyShield`** — before executing a VLA action, rolls out N imagined
  trajectories and rejects any candidate whose worst `SafetyClassifier` score
  crosses the threshold, resampling or falling back; predicted violations flow
  to a `@kuanyin/precognition` sink. (176.7.1.3)
- **`DomainRandomizer`** — sim-to-real adaptation by randomising texture,
  lighting, and physics inside imagination, with a transfer-budget estimator
  targeting a halved on-hardware fine-tune budget. (176.7.1.2)
- **`NpcPlanner`** — `@hathor/llm-npc` NPCs plan by imagining over the Hathor
  economy/politics latent and picking the goal-maximising action, no
  hand-written rules. (176.7.2.1)
- **`IrisPlannerGate`** — latency-gated MuZero look-ahead for
  `@iris/reasoning-thinking`: a transparent difficulty classifier + budget check
  decide whether to engage tree search and how many simulations to afford.
  (176.7.2.2)
- **`NpcCognitiveCore`** — the Phase 81 upgrade path: an on-device SLM policy
  wired through the RSSM, scaling imagination depth to a ≤30 ms per-decision
  budget so NPCs dream-plan on consumer hardware. (176.7.2.3)
- **`GalateaWorldModelFusion`** — freezes V-JEPA observations into aligned robot
  episodes and ranks VLA policies through uncertainty-adjusted RSSM imagination,
  exposing the imagined REINFORCE objective without touching hardware.

## Not included (external — left unchecked in TODOS)

The Open-X-Embodiment + DROID + internal-teleop training and measured real-robot
fine-tuning outcome in `176.7.1.1` require the datasets and accelerators; its
locally actionable V-JEPA/RSSM fusion is implemented above.

```
npx vitest run --root libs/nous/wm-integration
```
