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 orphan librarytopic 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)

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 }
21func vh_p(s: *u8) -> i64 { sys_write(1, s, vh_slen(s)); return 0 }
23func vh_eq(a: *u8, b: *u8) -> i64
30func vh_dup(s: *u8) -> *u8
38func vh_atoi(s: *u8) -> i64
45func vh_isws(c: i64) -> i64 { if c == 32 { return 1 } if c == 13 { return 1 } if c == 9 { return 1 } return 0 }
47func vh_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
62func vh_cat(dst: *u8, off: i64, s: *u8) -> i64
68func vh_catn(dst: *u8, off: i64, v: i64) -> i64
81func vh_find(list: *i64, n: i64, s: *u8) -> i64
87func vh_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
94func vh_isrel(b: *u8, koff: i64, kl: i64) -> i64
99func vh_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
123func vh_datedays(s: *u8) -> i64
159func vh_recency(days_since: i64, cad: i64) -> i64
166func vh_freq(count: i64) -> i64 { var f: i64 = count * 25; if f > 100 { f = 100 } return f }
167func vh_bal(owe: i64) -> i64 { var b: i64 = 100 - owe * 25; if b < 0 { b = 0 } return b }
169func main(argc: i64, argv: *i64) -> i64