code wiki / _hdl_build / nx_vizsla_health.nx
nx_vizsla_health.nx
buildroot/runtime/_hdl_build/nx_vizsla_health.nx
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
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
structs
| none |
consts
| 15 | const K_MAGIC_1970: i64 = 1970 |
| 16 | const K_MAGIC_146097: i64 = 146097 |
| 17 | const K_MAGIC_719468: i64 = 719468 |
| 18 | const K_MAGIC_131072: i64 = 131072 |
functions
| 20 | func vh_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 21 | func vh_p(s: *u8) -> i64 { sys_write(1, s, vh_slen(s)); return 0 } |
| 23 | func vh_eq(a: *u8, b: *u8) -> i64 |
| 30 | func vh_dup(s: *u8) -> *u8 |
| 38 | func vh_atoi(s: *u8) -> i64 called by 1: main |
| 45 | func 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 |
| 47 | func vh_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 62 | func vh_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 68 | func vh_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 81 | func vh_find(list: *i64, n: i64, s: *u8) -> i64 |
| 87 | func vh_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 94 | func vh_isrel(b: *u8, koff: i64, kl: i64) -> i64 |
| 99 | func vh_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 123 | func vh_datedays(s: *u8) -> i64 |
| 159 | func vh_recency(days_since: i64, cad: i64) -> i64 called by 1: main |
| 166 | func vh_freq(count: i64) -> i64 { var f: i64 = count * 25; if f > 100 { f = 100 } return f } called by 1: main |
| 167 | func vh_bal(owe: i64) -> i64 { var b: i64 = 100 - owe * 25; if b < 0 { b = 0 } return b } called by 1: main |
| 169 | func main(argc: i64, argv: *i64) -> i64 |