code wiki / (root) / nx_teacher_consult.nx

nx_teacher_consult.nx

buildroot/runtime/nx_teacher_consult.nx

4124 B89 linesdepth 10pulls 11 transitivereach 1 importersview sourcekind tooltopic teacher
docsdependenciesstructsconstsfunctions

about

nx_teacher_consult.nx -- makes the unified capability store ACTIONABLE (Teacher arc, rung R4): the team (or operator) ASKS "what do we know about <topic>?" and gets every matching insight. Until now the store was write + recall-by-id only; consult turns 113 stored lessons into on-demand wisdom the team consults WHILE working (e.g. before a build: consult "compile"; before a publish: consult "publish"). Match = the insight's rule CONTAINS the query (case-insensitive substring). Reads the shared native store via ncfg -- coordinates THROUGH the store (SL-004), imports nx_teacher_merge for the store machinery only. No network/hardware writes (Rule 26). license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_teacher_merge.nx nx_syscalls.nx nx_teacher_consult.nx nx_teacher_consult_gate.nx

imports: nx_teacher_merge.nxnx_syscalls.nx

imported by: nx_teacher_consult_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main tc_puts sys_write ncfg_open ss_open_cached ssc_init sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable nxa_dump_sizes ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 ss_open3 sys_now_us sys_mmap ↻ ss_manifest_dyn ss3_admit ss3_load_range ssl_total_keys_mask ss3_ann ss_close_seg ss3_move ss3_remap_table sys_madvise ss_tr ss3_insert_new sys_munmap

structs

none

consts

none

functions

12func tc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: tc_consulttc_askmain calls 1: sys_write
13func tc_putn(v: i64) -> i64
called by 2: tc_askmain calls 2: sys_writesys_mmap
22func tc_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: tc_contains_ci
24func tc_contains_ci(hay: *u8, needle: *u8) -> i64
called by 1: tc_consult calls 1: tc_lc
38func tc_consult(store: *u8, query: *u8) -> i64
68func tc_ask(store: *u8, query: *u8) -> i64
called by 1: main calls 3: tc_putstc_consulttc_putn
75func main() -> i64