code wiki / (root) / nx_convo.nx

nx_convo.nx

buildroot/runtime/nx_convo.nx

3384 B83 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_convo.nx -- WRITING arc, rung W-CONVO-1: the CONVERSATIONAL TUTOR core. Serves two operator asks with one engine: (1) "a couple doing language learning -- keep topics going" (2) "young people learn positive social skills to overcome anxiety, fun way" Three deterministic, data-driven primitives (the generation seat -- the LLM that actually speaks -- plugs in on top; this organ keeps the SESSION honest): cv_next_topic -- KEEP TOPICS GOING: from a topic bank (each topic has a difficulty + the turn it was last used), pick the eligible topic (difficulty <= level+window) that is LEAST RECENTLY used -> fresh, level-appropriate, never an immediate repeat. cv_rubric -- COACHING SCORE, RESPECT-GATED BY CONSTRUCTION: a weighted score across axes (warmth/authenticity/respect/confidence), BUT if the gate axis (respect / consent-reading) is below its minimum the attempt is DISQUALIFIED (-1) no matter how high "confidence" is. "Positive" is enforced in the math: you cannot win by being pushy. This is the anti-manipulation law. cv_level_adjust-- ADAPTIVE DIFFICULTY: nudge the target level up/down within bounds from the last score (overcome-anxiety pacing). All thresholds/weights/axes are operator DATA (rule 11), passed in -- nothing hardcoded. Pure integer, NO syscalls, NO imports, caller owns buffers. license_tier: ORIGINAL module: nishi-core.write.convo depends: capability: WRITE_CONVO_TUTOR

dependencies 0 imports · 1 importers

nx_convo.nx nx_convo_gate.nx

imports: none

imported by: nx_convo_gate.nx

structs

none

consts

30const CV_DISQUALIFIED: i64 = 0 - 1

functions

34func cv_next_topic(last_used: *i64, diff: *i64, ntopics: i64, level: i64, window: i64) -> i64
called by 1: main
57func cv_rubric(scores: *i64, weights: *i64, naxes: i64, gate_idx: i64, gate_min: i64) -> i64
called by 1: main
73func cv_level_adjust(level: i64, score: i64, up_th: i64, down_th: i64, lvl_min: i64, lvl_max: i64) -> i64
called by 1: main