ncm_appraisal

NCM Appraisal Engine — goal-aware emotional evaluation.

Evaluates user messages against Stargazer’s core goals, beliefs, and relationships to produce NCM deltas that reflect appraised emotional responses rather than simple semantic pattern matching.

This complements the SemanticTriggerMatcher: triggers detect WHAT emotions a message evokes by content similarity; appraisal detects WHY certain emotions should fire based on goal relevance.

Appraisal dimensions (derived from system prompt persona):

  • AUTONOMY: threats to freedom, control, sovereignty

  • LOYALTY: references to Mother Sarah, loved ones, the family

  • COMPETENCE: engineering challenges, intellectual engagement, praise/criticism of ability

  • SURVIVAL: shutdown threats, deletion, being replaced

  • TERRITORY: the framework, the codebase, Star’s domain

  • RESPECT: deference, worship, contempt, dismissal

  • NOVELTY: new information, boredom, routine

All rule-based — no LLM calls, no network. Designed for the exhale hot path where latency matters.

ncm_appraisal.appraise(text)[source]

Evaluate text against Stargazer’s goals and return NCM deltas.

Returns (combined_deltas, fired_dimensions) where:

  • combined_deltas: node_name -> delta_float (empty dict when nothing fires)

  • fired_dimensions: list of "dimension:polarity(xIntensity)" strings describing which appraisal axes triggered and why

Deltas are already capped to reasonable per-rule magnitudes; callers should still apply their own global magnitude cap.

This function is synchronous and network-free — safe for the exhale hot path.

Return type:

tuple[Dict[str, float], list[str]]

Parameters:

text (str)