code wiki / _hdl_build / nx_vizsla_deal.nx
nx_vizsla_deal.nx
buildroot/runtime/_hdl_build/nx_vizsla_deal.nx
about
nx_vizsla_deal.nx -- NISHI VIZSLA business CRM: the deal/pipeline focus (operator 2026-06-23: "crm for
business ... with seperate focuses"). What makes a CRM more than relationship-tending: DEALS with pipeline
STAGES + value + a stage-weighted forecast. Same sovereign CID/seg_store plane as money (V1) + relationships
(V4): a deal is a record, a stage change is an ADDITIVE event (latest-by-date wins, history kept). Lives in
the business realm's deal store. The stage->win-probability map is the MODEL AS DATA (refine = edit, law 11).
load <dealfile> <prefix> [segid] DEAL <id> <account> <value_cents> <title> -> "deal:" records
STAGE <date> <deal-id> <stage> -> "stg:" records
pipeline <prefix> <today> per deal: latest stage, value, weighted=value*prob; verdict =
deals/open/won/lost + total_value/won_value/weighted_pipeline
Stages: lead 10 / qualified 30 / proposal 50 / negotiation 70 / won 100 / lost 0 (percent). Determinism:
stdout has no clocks (today via argv). Loud-fail: bad value/date, unknown stage. 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
| 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_2048: i64 = 2048 |
| 19 | const K_MAGIC_4096: i64 = 4096 |
| 20 | const K_MAGIC_1024: i64 = 1024 |
| 21 | const K_MAGIC_131072: i64 = 131072 |
functions
| 23 | func vd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 24 | func vd_p(s: *u8) -> i64 { sys_write(1, s, vd_slen(s)); return 0 } |
| 26 | func vd_eq(a: *u8, b: *u8) -> i64 |
| 33 | func vd_dup(s: *u8) -> *u8 |
| 41 | func vd_atoi(s: *u8) -> i64 |
| 48 | func vd_digits(s: *u8) -> i64 called by 1: vd_cmd_load |
| 55 | func vd_isws(c: i64) -> i64 called by 1: vd_tok |
| 62 | func vd_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 80 | func vd_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 86 | func vd_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 99 | func vd_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 106 | func vd_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 130 | func vd_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 137 | func vd_datedays(s: *u8) -> i64 |
| 173 | func vd_prob(stage: *u8) -> i64 |
| 184 | func vd_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64 |
| 212 | func vd_cmd_load(argc: i64, argv: *i64) -> i64 |
| 293 | func vd_cmd_pipeline(argc: i64, argv: *i64) -> i64 |
| 420 | func main(argc: i64, argv: *i64) -> i64 |