Gestalt in Beast — a record of an unresolved problem (goal image, branch, situation, tested automatizms, status). Insight — linking the goal with a candidate solution; part of the insights arrives when an EM frame is closed and from the resonance buffer.
closeLastFrame after computing effect (before clearing waiting globals). A signature of the closed episode is pushed to the buffer: the waiting cycle, goalImageId, branch, situation, automatism, OD, effect, kind (positive_feedback / non_positive). If the waiting cycle had a goal, the Gestalt for goalImageId is found or created: the automatism is appended; when effect > 0 branch/situation are refined and status becomes PARTIAL or, for a strong effect, successful close; when effect ≤ 0 it creates a re-interpretation insight.
Gestalt_onConsciousnessTick, the master open Gestalt runs Gestalt_processResonanceBufferForCycle: for entries with effect > 0 a score is computed against the Gestalt (goal, branch, situation…). If the score passes the threshold — an analogy insight is registered; automatismIds and analogyPool are updated and status can move NEW → STARTED, etc.
The threshold for a “strong” positive effect that switches into the success status is configured in gestalt.js (EFFECT_STRONG_CLOSE).