code wiki / (root) / nx_teacher_trainer.nx

nx_teacher_trainer.nx

buildroot/runtime/nx_teacher_trainer.nx

8599 B178 linesdepth 10pulls 11 transitivereach 4 importersview sourcekind tooltopic teacher
docsdependenciesstructsconstsfunctions

about

nx_teacher_trainer.nx -- the TRAINER half of the Nishi Teacher (Teacher arc, rung R3 = spaced review). Operator: "consume all our information from the nishi teacher AND TRAINER so we get insights to improve the team's capabilities." The teacher SYNTHESIZES insights into the unified native capability store (nx_teacher_merge); the trainer SCHEDULES spaced retrieval practice over them and MEASURES coverage. Grounding = the cited learning science already in knowledge/registry/teaching_evidence.tsv (Bjork desirable difficulties: retrieval practice + spacing beat re-reading). Append-only review state in the native seg_store (tag "rev", row = {id, reps, interval, due}); current state of an id = its LAST appended row (additive, history-sacred #13). Spacing: first practice -> 1-day interval, each subsequent success DOUBLES it; an insight is DUE if never practiced OR now >= its due epoch. Coverage = (insights practiced >=1) *1000 / total -- a MEASURED readiness number. trn_practice(state, id, now) -- record a retrieval-practice event (advances spacing) trn_due_count(cap, state, now) -- how many unified insights are due for practice trn_coverage(cap, state) -- how many are under active practice (the meter) HONEST SCOPE (no-overclaim, [[feedback-no-wave-measured-exceed]]): this SCHEDULES practice and MEASURES coverage; it does NOT by itself prove the team got "smarter" -- a real capability LIFT needs the team to actually practice + a before/after task-performance measure (a further rung). license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_teacher_merge.nx nx_syscalls.nx nx_teacher_trainer.nx nx_teacher_publish.nx nx_teacher_trainer_gate.nx

imports: nx_teacher_merge.nxnx_syscalls.nx

imported by: nx_teacher_publish.nxnx_teacher_trainer_gate.nx

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

main trn_puts sys_write sys_now_realtime_sec sys_mmap sys_clock_gettime_real ncfg_open ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻ ssl_lookup ssl_hash_entry ↻ ssl_key_eq ↻

structs

none

consts

24const TRN_DAY: i64 = 86400

functions

26func trn_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 1: main calls 1: sys_write
27func trn_putn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
36func trn_itoa(v: i64, out: *u8) -> i64
called by 1: trn_append_state calls 1: sys_mmap
49func trn_atoi(s: *u8) -> i64
called by 1: trn_state
56func trn_state(state_store: *u8, id: *u8, out3: *i64) -> i64
80func trn_append_state(state_store: *u8, id: *u8, reps: i64, interval: i64, due: i64) -> i64
99func trn_practice(state_store: *u8, id: *u8, now: i64) -> i64
109func trn_due_count(cap_store: *u8, state_store: *u8, now: i64) -> i64
134func trn_coverage(cap_store: *u8, state_store: *u8) -> i64
157func main() -> i64