code wiki / (root) / nx_arousal_clinical.nx

nx_arousal_clinical.nx

buildroot/runtime/nx_arousal_clinical.nx

10519 B205 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic arousal
docsdependenciesstructsconstsfunctions

about

nx_arousal_clinical.nx -- the THERAPY READOUT. Given a dual-control profile (SES/SIS1/SIS2), identify WHICH axis is limiting this person and what changing it would actually buy them, in minutes rather than in permil. ★WHY THIS AND NOT A SCORE: the clinically load-bearing finding is that most arousal difficulty is EXCESS INHIBITION, not deficit excitation -- and SIS1 (threat of performance failure) vs SIS2 (threat of consequences) point to DIFFERENT treatments. A single "arousal score" collapses exactly the distinction the clinician needs. So this organ reports COUNTERFACTUALS per axis, never a scalar. ★AND IT REFUSES TO GUESS. When two axes are within `margin` of each other the limiting factor is genuinely ambiguous, and the organ says AMBIGUOUS instead of naming one. An instrument that always names a cause is a horoscope; the refusal is the difference between a measurement and a reading. ★TIME IS THE UNIT A PERSON FEELS. Permil drive means nothing to a user; "this adds 9 minutes to your time-to-plateau" is the thing a therapy session can act on. usage: nx_arousal_clinical profile <stim> <ses> <sis1> <sis2> [sex0m1f] [target_permil] nx_arousal_clinical selftest license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_arousal_lib.nx nx_arousal_clinical.nx

imports: nx_arousal_lib.nx

imported by: nobody (leaf or entry point)

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

main a_puts sys_write sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close a_putn sys_write ↻ sys_mmap ↻ sys_munmap a_atoi cl_advice a_conf a_slen a_atoi ↻ a_drive cl_time_to a_lag cl_name

structs

none

consts

21const CL_MAGIC_185000: i64 = 185000
22const CL_MAGIC_210000: i64 = 210000
24const CL_MAXMS: i64 = 3600000
25const CL_MARGIN: i64 = 40

functions

28func cl_time_to(target: i64, drive: i64, tau: i64) -> i64
called by 1: main calls 1: a_lag
41func cl_name(ax: i64) -> *u8
called by 1: main
47func cl_advice(ax: i64) -> *u8
called by 1: main
53func main(argc: i64, argv: *i64) -> i64