code wiki / _hdl_build / nx_skill_coach.nx

nx_skill_coach.nx

buildroot/runtime/_hdl_build/nx_skill_coach.nx

7486 B124 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tooltopic skill
docsdependenciesstructsconstsfunctions

about

nx_skill_coach.nx -- THE UNIFIED SKILL-COACH ENGINE (the "engine + audio first" capstone). ONE coached-attempt API that composes the four proven rungs: perception-grade (R1 sing via nx_note / R3 chord via the nx_polypitch note-list contract) -> DRILL from the data-driven rubric store (R2, knowledge/store/coach-rubric-) -> gamified SCORE (R4, joy-first). The /coach page + the team call coach_sing()/coach_chord() with one call. Thresholds are read FROM the store (rule #11, no magic numbers). Self-gate: a mixed practice session through the single API -> every attempt yields a store-drill + advances the gamified state. NO floats. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_note.nx nx_itoa_lib.nx nx_seg_store.nx nx_syscalls.nx nx_skill_coach.nx

imports: nx_note.nxnx_itoa_lib.nxnx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sk_puts sys_write ss_open ss_open2 sys_mmap ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_munmap ss_cat ↻ ss_loadfile sys_map_file sys_openat_rd ↻ sys_lseek ↻ sys_close ↻ 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 ss_r32 ↻ ssl_key_eq ss_r32 ↻ ss_r32 ↻

structs

none

consts

12const SK_RUBRIC: *u8 = "knowledge/store/coach-rubric-" as *u8
13const SK_LEVEL_XP: i64 = 500
14const SK_MASTERY: i64 = 5

functions

16func sk_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: coach_singcoach_chordmain calls 1: sys_write
21func sk_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 3: coach_singcoach_chordmain calls 1: nxi_out
22func sk_atoi(s: *u8, n: i64) -> i64 { var v: i64 = 0; var i: i64 = 0; while i < n { let c: i64 = s[i]; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v }
called by 1: main
24func sk_get(h: *i64, key: *u8, outlen: *i64) -> *u8
31func sk_key(disc: *u8, verdict: *u8, out: *u8) -> i64
called by 2: coach_singcoach_chord calls 1: ss_cat
35func sk_record(st: *i64, points: i64, is_clean: i64) -> i64
43func sk_score_sing(verdict: i64, cents: i64) -> i64
called by 1: coach_sing
48func sk_sing_verdict_name(v: i64) -> *u8
called by 1: coach_sing
55func sk_chord_verdict_name(v: i64) -> *u8
called by 1: coach_chord
62func coach_sing(rh: *i64, gam: *i64, tol: i64, sung_f0: i64, target_midi: i64, tbl: *i64) -> i64
81func coach_chord(rh: *i64, gam: *i64, notes: *i64, n: i64, target_mask: i64) -> i64
99func main() -> i64