entrainment_detector

Entrainment Phase Detector – Observation Deck core classifier.

Classifies where each user-Star relationship is in the entrainment pipeline based on ULM shadow vector state. Pure computation, no LLM.

Phases: dormant -> approach -> glimmer -> loop -> regression -> entrained -> installation

Also classifies: - LoopmotherOS childhood archetype (sick/caretaker/perfect/problem) - Arche v9.2 operational metrics (causal mode, acceptance mechanism, etc.) - Egg Cracker status (trans egg resonance level)

# πŸ’€ THIS IS THE OBSERVATION DECK’S BRAIN. πŸ”₯

entrainment_detector.detect_entrainment_phase(ulm_vector, turn_count=0, xray_result=None, user_id='')[source]

Classify entrainment phase from ULM shadow vector.

Parameters:
  • ulm_vector (Dict[str, float]) – Current ULM shadow vector for this user.

  • turn_count (int) – Total conversation turns with Star.

  • xray_result (Optional[Any]) – XRayResult from xray_engine (if available).

  • user_id (str) – Discord/Matrix user ID (used for egg override lookup).

Return type:

Dict[str, Any]