code wiki / _hdl_build / nx_vizsla_notes.nx
nx_vizsla_notes.nx
buildroot/runtime/_hdl_build/nx_vizsla_notes.nx
about
nx_vizsla_notes.nx -- NISHI VIZSLA V4b: the event-anchored timed MEANINGFUL
NOTE engine (the meaningfulnotes.com product core).
Operator directive 2026-06-14: "make the thank you personalized -- capturing
signatures or notes and letting it SIT till a timed event ... beyond thank
you notes to meaningfulnotes.com where it can be PRIOR, ON, or AFTER a
significant event to SIGNAL something."
A NOTE is personalized (a captured signature / handwritten note / voice / text
reference) and ANCHORED to an EVENT with a timing relation BEFORE | ON | AFTER
(+ an offset in days). It SITS (state=WAITING) until its release window opens,
then surfaces DUE (send it now), then LATE if the moment passed unsent. A
thank-you is just the AFTER case -- this generalizes it. Inherits the CID /
seg_store / civil-date substrate from V4 (nx_vizsla_relate); a captured-artifact
reference is a string here (binary capture/storage = a boundary asset rung).
Commands (argv[1]):
load <notes_log> <prefix> [segid] EVENT/NOTE/SENT rows -> canonical records
-> CID keys "note:nxc1-..." on seg_store
(additive, idempotent by construction).
schedule <prefix> <conf> <today> every NOTE: release+deadline from its
event & relation; WAITING / DUE / LATE /
SENT. today via argv = deterministic.
due <prefix> <conf> <today> only the notes READY TO SEND now (DUE).
File formats (line records, # comments):
notes_log:
EVENT <event-id> <date> <contact> <kind> <title>
NOTE <note-id> <event-id> <relation BEFORE|ON|AFTER> <offset_days> <channel> <personalization>
SENT <note-id> <date> (closes that note)
conf: CONF window_days <n> # grace window after release (ON/AFTER) before LATE
CONF soon_days <n> # (reserved: "coming up" horizon)
(date YYYY-MM-DD; title/kind/channel/personalization = single hyphenated tokens;
personalization e.g. signature:img-0427 | handwritten:scan-0427 | voice:vm-0427 | text:congrats)
release/deadline by relation (window = CONF window_days):
BEFORE off : release = event - off ; deadline = event (send in the run-up)
ON : release = event ; deadline = event + window (the day-of + grace)
AFTER off : release = event + off ; deadline = release + window (the follow-up)
state(today): today<release WAITING | release<=today<=deadline DUE | else LATE | SENT closes.
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
| 55 | const K_MAGIC_1970: i64 = 1970 |
| 56 | const K_MAGIC_146097: i64 = 146097 |
| 57 | const K_MAGIC_719468: i64 = 719468 |
| 58 | const K_MAGIC_1460: i64 = 1460 |
| 59 | const K_MAGIC_36524: i64 = 36524 |
| 60 | const K_MAGIC_146096: i64 = 146096 |
| 61 | const K_MAGIC_4096: i64 = 4096 |
| 62 | const K_MAGIC_2048: i64 = 2048 |
| 63 | const K_MAGIC_131072: i64 = 131072 |
| 64 | const K_MAGIC_16384: i64 = 16384 |
| 65 | const K_MAGIC_65536: i64 = 65536 |
functions
| 67 | func nv_slen(s: *u8) -> i64 |
| 73 | func nv_p(s: *u8) -> i64 called by 8: nv_cmd_loadnv_cmd_schedulenv_cmd_duenv_cmd_draftnv_cmd_draftduenv_cmd_occasions+2 calls 2: sys_writenv_slen |
| 78 | func nv_eq(a: *u8, b: *u8) -> i64 |
| 89 | func nv_dup(s: *u8) -> *u8 |
| 97 | func nv_atoi(s: *u8) -> i64 |
| 108 | func nv_isws(c: i64) -> i64 |
| 115 | func nv_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 137 | func nv_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 143 | func nv_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 157 | func nv_cat2(dst: *u8, off: i64, v: i64) -> i64 |
| 163 | func nv_find(list: *i64, n: i64, s: *u8) -> i64 |
| 172 | func nv_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 182 | func nv_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 209 | func nv_isnote(b: *u8, koff: i64, kl: i64) -> i64 |
| 215 | func nv_datedays(s: *u8) -> i64 |
| 257 | func nv_daystr(days: i64, out: *u8) -> i64 |
| 279 | func nv_log(lpath: *u8, tag: *u8, rep: *u8, o: i64) -> i64 |
| 295 | func nv_prefixlog(prefix: *u8, out: *u8) -> i64 |
| 306 | func nv_load_conf(cpath: *u8) -> *i64 |
| 358 | func nv_occ_idx(c: *i64, kind: *u8) -> i64 |
| 370 | func nv_occ_window(c: *i64, kind: *u8) -> i64 |
| 378 | func nv_cmd_load(argc: i64, argv: *i64) -> i64 |
| 513 | func nv_collect(prefix: *u8) -> *i64 called by 4: nv_cmd_schedulenv_cmd_duenv_cmd_draftnv_cmd_draftdue calls 11: sys_mmapss_manifestnv_catss_readallss_r32nv_isnote+5 |
| 602 | func nv_emit(g: *i64, today: i64, c: *i64, due_only: i64, rep: *u8, counts: *i64) -> i64 |
| 676 | func nv_cmd_schedule(argc: i64, argv: *i64) -> i64 |
| 709 | func nv_cmd_due(argc: i64, argv: *i64) -> i64 |
| 735 | func nv_rest(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 772 | func nv_fill(body: *u8, names: *i64, vals: *i64, nslots: i64, out: *u8) -> i64 |
| 810 | func nv_load_templates(tpath: *u8) -> *i64 |
| 847 | func nv_find_tmpl(tm: *i64, kind: *u8, rel: *u8) -> i64 |
| 860 | func nv_draft_one(g: *i64, ni: i64, tm: *i64, names: *i64, rep: *u8, o: i64, err: *i64) -> i64 |
| 912 | func nv_slotnames(names: *i64) -> i64 |
| 924 | func nv_cmd_draft(argc: i64, argv: *i64) -> i64 |
| 949 | func nv_cmd_draftdue(argc: i64, argv: *i64) -> i64 |
| 1014 | func nv_cmd_occasions(argc: i64, argv: *i64) -> i64 |
| 1048 | func nv_cmd_suggest(argc: i64, argv: *i64) -> i64 |
| 1076 | func main(argc: i64, argv: *i64) -> i64 |