code wiki / _hdl_build / nx_vizsla_relate.nx

nx_vizsla_relate.nx

buildroot/runtime/_hdl_build/nx_vizsla_relate.nx

39928 B1056 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_relate.nx -- NISHI VIZSLA V4: the relationships / PRM keystone. Operator directive 2026-06-14: "build the project management and PRM ... help us manage our contacts, thank yous". This is the sovereign home of the old nishi-prm "Tom Hagen consigliere" design: proactive counsel, a BIDIRECTIONAL obligation ledger (debts I owe AND credits owed to me), and thank-you tracking as a managed obligation -- folded onto the VIZSLA substrate (CID records on seg_store, civil-date math, idempotent-by-construction) inherited from V2c. THEORY AS DATA (law 11/25): relationship tiers + their desired touch cadence, and the "coming up soon" window, all live in contacts.txt -- refining the model (a new tier, a tighter cadence) is a data edit, never a recompile. Commands (argv[1]): load <relate_log> <prefix> [segid] TOUCH/OBLIGATION/SETTLE/THANKS/SENT rows -> canonical records -> CID keys "rel:nxc1-..." on seg_store = additive, idempotent-by-construction (law 10). cadence <prefix> <contacts> <today> per contact: LATEST touch date vs its TIER cadence -> FRESH / DUE(reconnect) / NEW(introduce). today via argv = deterministic stdout. ledger <prefix> <contacts> bidirectional obligation ledger: open OWE (I owe) + open DUE (owed to me) after applying SETTLE; per-direction counts + cent totals. Closing is an ADDITIVE settle event, never a delete. thanks <prefix> <contacts> <today> open thank-yous (THANKS with no matching SENT): days owed, PENDING(<=soon_days) / OVERDUE. Gratitude as a tracked debt. brief <prefix> <contacts> <today> the CONSIGLIERE daily brief: follow-ups due + birthdays within soon_days + open thank-yous + open obligations, composed into one "what to do today". File formats (line records, # comments): contacts: CONF soon_days <n> TIER <name> <cadence_days> CONTACT <id> <display> <tier> <birthday> (birthday MM-DD or "-") relate_log: TOUCH <date> <contact> <note>

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_relate.nx

imports: nx_syscalls.nxnx_canon_cid.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 rl_p sys_write rl_slen rl_eq rl_cmd_load rl_p ↻ rl_atoi sys_now_us sys_mmap sys_clock_gettime_mono sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_begin ss_begin_cap sys_mmap ↻ rl_tok rl_isws rl_eq ↻ rl_datedays sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update

structs

none

consts

64const K_MAGIC_1970: i64 = 1970
65const K_MAGIC_146097: i64 = 146097
66const K_MAGIC_719468: i64 = 719468
67const K_MAGIC_4096: i64 = 4096
68const K_MAGIC_2048: i64 = 2048
69const K_MAGIC_65536: i64 = 65536
70const K_MAGIC_131072: i64 = 131072

functions

72func rl_slen(s: *u8) -> i64
called by 3: rl_prl_duprl_kmemeq
78func rl_p(s: *u8) -> i64
83func rl_eq(a: *u8, b: *u8) -> i64
94func rl_dup(s: *u8) -> *u8
102func rl_atoi(s: *u8) -> i64
113func rl_isws(c: i64) -> i64
called by 1: rl_tok
120func rl_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 2: rl_load_contactsrl_cmd_load calls 1: rl_isws
142func rl_cat(dst: *u8, off: i64, s: *u8) -> i64
148func rl_catn(dst: *u8, off: i64, v: i64) -> i64
161func rl_find(list: *i64, n: i64, s: *u8) -> i64
170func rl_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: rl_fieldrl_isrel calls 1: rl_slen
181func rl_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
208func rl_isrel(b: *u8, koff: i64, kl: i64) -> i64
214func rl_datedays(s: *u8) -> i64
256func rl_yearof(s: *u8) -> i64
called by 1: rl_bday_until
270func rl_bday_until(today: *u8, today_days: i64, mmdd: *u8) -> i64
294func rl_log(lpath: *u8, tag: *u8, rep: *u8, o: i64) -> i64
310func rl_prefixlog(prefix: *u8, out: *u8) -> i64
321func rl_load_contacts(cpath: *u8) -> *i64
393func rl_cmd_load(argc: i64, argv: *i64) -> i64
534func rl_latest_touch(prefix: *u8, cf: *i64, a_days: *i64, a_date: *i64) -> i64
587func rl_cmd_cadence(argc: i64, argv: *i64) -> i64
653func rl_collect_obligs(prefix: *u8) -> *i64
740func rl_cmd_ledger(argc: i64, argv: *i64) -> i64
798func rl_collect_thanks(prefix: *u8) -> *i64
875func rl_cmd_thanks(argc: i64, argv: *i64) -> i64
931func rl_cmd_brief(argc: i64, argv: *i64) -> i64
1046func main(argc: i64, argv: *i64) -> i64