code wiki / _hdl_build / nx_vizsla_remind.nx
nx_vizsla_remind.nx
buildroot/runtime/_hdl_build/nx_vizsla_remind.nx
about
nx_vizsla_remind.nx -- NISHI VIZSLA REMINDER ENGINE (census PA18 core): birthday +
important-event reminders with lead times and a sent-once delivery ledger.
Operator 2026-07-07: "birthday and important event reminder". COMPOSES the existing planes:
calendar events + recurrences (nx_vizsla_calendar cal:/rec: records, YEARLY included) and the
relate contacts file (CONTACT <id> <display> <tier> <MM-DD|->). The organ computes WHAT is
due at which lead (14/7/1/0 days -- the leads are an ARGUMENT, data not magic numbers) and
the ledger guarantees each (kind,id,date) notice is delivered ONCE (additive snt: records,
CID-idempotent). Actual outward push (email/phone) composes the sovereign email stack behind
the operator's outward-facing consent -- this organ is the truth of what to send and whether
it was sent, deterministic (today is argv, never a clock).
Commands:
due <calprefix|-> <contactsfile|-> <today> <leads> [sentprefix]
leads = comma ints e.g. 14,7,1,0 ; window = [today, today+max(leads)].
calendar occurrence / next birthday occurrence (MM-DD; Feb-29 clamps to Feb-28 in
non-leap years, mirroring the calendar's YEARLY clamp) with days-until IN the leads set
-> VIZSLA-REM-DUE; already in the sent ledger -> VIZSLA-REM-SENT-SKIP (counted, shown).
mark <sentprefix> <event|birthday> <id> <date> [segid]
append the sent record (idempotent -> new=0 on re-mark).
Loud-fail: bad today/leads/date, missing named files, bad kind.
spec: knowledge/research/2026-06-22-vizsla-sclass-roadmap.md license_tier: ORIGINAL
dependencies 3 imports · 0 importers
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
structs
| none |
consts
| 25 | const K_MAGIC_1970: i64 = 1970 |
| 26 | const K_MAGIC_146097: i64 = 146097 |
| 27 | const K_MAGIC_719468: i64 = 719468 |
| 28 | const K_MAGIC_146096: i64 = 146096 |
| 29 | const K_MAGIC_1460: i64 = 1460 |
| 30 | const K_MAGIC_36524: i64 = 36524 |
| 31 | const K_MAGIC_2048: i64 = 2048 |
| 32 | const K_MAGIC_262144: i64 = 262144 |
| 33 | const K_MAGIC_1024: i64 = 1024 |
functions
| 35 | func vr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 36 | func vr_p(s: *u8) -> i64 { sys_write(1, s, vr_slen(s)); return 0 } |
| 38 | func vr_eq(a: *u8, b: *u8) -> i64 |
| 49 | func vr_dup(s: *u8) -> *u8 |
| 57 | func vr_atoi(s: *u8) -> i64 |
| 68 | func vr_digits(s: *u8) -> i64 called by 1: vr_cmd_due |
| 80 | func vr_isws(c: i64) -> i64 called by 1: vr_tok |
| 87 | func vr_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 109 | func vr_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 115 | func vr_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 128 | func vr_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 138 | func vr_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 165 | func vr_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 170 | func vr_datedays(s: *u8) -> i64 |
| 211 | func vr_ymd2days(y0: i64, m: i64, d: i64) -> i64 |
| 223 | func vr_civil(z0: i64, out: *i64) -> i64 |
| 241 | func vr_dim(y: i64, m: i64) -> i64 |
| 257 | func vr_occ(freq: *u8, sd0: i64, sy: i64, sm: i64, sd: i64, interval: i64, k: i64) -> i64 |
| 271 | func vr_daystr(dst: *u8, off: i64, days: i64) -> i64 |
| 285 | func vr_find(list: *i64, n: i64, s: *u8) -> i64 |
| 296 | func vr_bday_next(mmdd: *u8, today: i64) -> i64 |
| 337 | func vr_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64 |
| 370 | func vr_sent_gather(prefix: *u8, kk: *i64, ii: *i64, dd: *i64, np: *i64) -> i64 |
| 418 | func vr_sent_has(kk: *i64, ii: *i64, dd: *i64, n: i64, k: *u8, id: *u8, date: *u8) -> i64 |
| 432 | func vr_cmd_due(argc: i64, argv: *i64) -> i64 |
| 701 | func vr_cmd_mark(argc: i64, argv: *i64) -> i64 |
| 755 | func main(argc: i64, argv: *i64) -> i64 |