code wiki / (root) / nx_survey.nx

nx_survey.nx

buildroot/runtime/nx_survey.nx

4503 B105 linesdepth 7pulls 8 transitivereach 26 importersview sourcekind librarytopic survey
docsdependenciesstructsconstsfunctions

about

nx_survey.nx -- R0 of THE NISHI SITUATION-MANAGEMENT arc: the POLL / SURVEY intake engine. The front door for a person to manage their situation and climb out of it: ask about income, debts, bills, hardships, goals; CAPTURE the response as a sovereign content-addressed record; derive a TRIAGE score that routes them to the right help (debt payoff / overbilling audit / affordable-funding / bills). Data- driven (#11): questions + triage weights + band thresholds are DATA, never hardcoded -- any survey, any scoring. Reuses canon_cid + seg_store (DRY). Commits with sys_now_us() (per reference-segstore-segid-use- now-us). No floats, no hardware writes, no auto-action -- records + scores; the person + engines act. license_tier: ORIGINAL

dependencies 4 imports · 5 importers

nx_syscalls.nx nx_canon_cid.nx nx_uxf_decode.nx nx_seg_store.nx nx_survey.nx nx_intake_handler.nx nx_intake_handler_gate.nx nx_intake_profile.nx nx_survey_engine.nx nx_survey_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_uxf_decode.nxnx_seg_store.nx

imported by: nx_intake_handler.nxnx_intake_handler_gate.nxnx_intake_profile.nxnx_survey_engine.nxnx_survey_gate.nx

structs

none

consts

none

functions

14func sv_itoa(v: i64, out: *u8) -> i64
called by 1: sv_record calls 1: sys_mmap
28func sv_atoi(s: *u8) -> i64
36func sv_streq(a: *u8, b: *u8) -> i64
called by 2: sv_getmain
41func sv_get(keys: *i64, vals: *i64, nf: i64, key: *u8) -> *u8
49func sv_record(prefix: *u8, respondent: *u8, qids: *i64, vals: *i64, n: i64, out_cid: *u8) -> i64
72func sv_load(prefix: *u8, cid: *u8, out_keys: *i64, out_vals: *i64, maxf: i64) -> i64
82func sv_answer(keys: *i64, vals: *i64, nf: i64, qid: *u8) -> i64
called by 3: mainsv_triagemain calls 2: sv_getsv_atoi
89func sv_triage(keys: *i64, vals: *i64, nf: i64, wqids: *i64, weights: *i64, nw: i64) -> i64
101func sv_band(score: i64, t_strained: i64, t_crisis: i64) -> i64