code wiki / _hdl_build / nx_vizsla_health.nx

nx_vizsla_health.nx

buildroot/runtime/_hdl_build/nx_vizsla_health.nx

13638 B332 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_health.nx -- NISHI VIZSLA: RELATIONSHIP INTELLIGENCE -- the S-class DEPTH a real PRM/CRM has and a cadence-only tool lacks. Operator 2026-06-23: "i want our prm crm professional relationship management engine to be s class exceeds and im sure we have none of the depth of real system yet." This is the depth core that Clay / Affinity / Monica / Salesforce charge for: a computed HEALTH SCORE per relationship that synthesizes the WHOLE interaction history into actionable intelligence -- which relationships are thriving vs quietly dying -- instead of just "due/fresh". Reads the V4 relate store (touches + obligations) on the sovereign CID/seg_store plane; computed LOCALLY (no cloud scoring, no data sale). Integer-only NO-FLOAT. score <prefix> <contacts> <today> per contact: recency + frequency + reciprocity -> 0-100 health + THRIVING/STEADY/COOLING/AT-RISK/NEW; verdict = counts + the at-risk list. MODEL AS DATA (refine = edit, law 11): recency bands (1x/2x/4x cadence -> 100/70/40/10), frequency (touches*25 cap 100), reciprocity (100 - open_owe*25), weights recency50/freq30/balance20, status thresholds. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_seg_store.nx nx_vizsla_health.nx

imports: nx_syscalls.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main vh_p sys_write vh_slen vh_eq vh_datedays sys_mmap sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close vh_tok vh_isws vh_dup vh_slen ↻ sys_mmap ↻ vh_atoi vh_find vh_eq ↻ ss_manifest ss_manifest_file sys_mmap ↻ ss_cat ss_readall ↻ vh_cat ss_r32 vh_isrel vh_kmemeq vh_slen ↻ vh_field ss_r32 ↻ vh_kmemeq ↻ vh_recency vh_freq vh_bal vh_catn sys_mmap ↻

structs

none

consts

15const K_MAGIC_1970: i64 = 1970
16const K_MAGIC_146097: i64 = 146097
17const K_MAGIC_719468: i64 = 719468
18const K_MAGIC_131072: i64 = 131072

functions

20func vh_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: vh_pvh_dupvh_kmemeq
21func vh_p(s: *u8) -> i64 { sys_write(1, s, vh_slen(s)); return 0 }
called by 1: main calls 2: sys_writevh_slen
23func vh_eq(a: *u8, b: *u8) -> i64
called by 2: vh_findmain
30func vh_dup(s: *u8) -> *u8
called by 1: main calls 2: vh_slensys_mmap
38func vh_atoi(s: *u8) -> i64
called by 1: main
45func vh_isws(c: i64) -> i64 { if c == 32 { return 1 } if c == 13 { return 1 } if c == 9 { return 1 } return 0 }
called by 1: vh_tok
47func vh_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 1: main calls 1: vh_isws
62func vh_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
68func vh_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
81func vh_find(list: *i64, n: i64, s: *u8) -> i64
called by 1: main calls 1: vh_eq
87func vh_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: vh_isrelvh_field calls 1: vh_slen
94func vh_isrel(b: *u8, koff: i64, kl: i64) -> i64
called by 1: main calls 1: vh_kmemeq
99func vh_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 2: ss_r32vh_kmemeq
123func vh_datedays(s: *u8) -> i64
called by 1: main calls 1: sys_mmap
159func vh_recency(days_since: i64, cad: i64) -> i64
called by 1: main
166func vh_freq(count: i64) -> i64 { var f: i64 = count * 25; if f > 100 { f = 100 } return f }
called by 1: main
167func vh_bal(owe: i64) -> i64 { var b: i64 = 100 - owe * 25; if b < 0 { b = 0 } return b }
called by 1: main
169func main(argc: i64, argv: *i64) -> i64