code wiki / (root) / nx_adhd.nx

nx_adhd.nx

buildroot/runtime/nx_adhd.nx

3143 B52 linesdepth 3pulls 3 transitivereach 16 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_adhd.nx -- R3 of THE NISHI SITUATION-MANAGEMENT arc: ADHD-specific INTERVENTIONS for the failure modes ADHD actually causes (operator: "adhd has things like impulse shopping planning failures inaction locks etc"). Targets each one, and -- crucially -- ADVISES, never BLOCKS (autonomy preserved; the never- brick analog #26 for a person's agency = a speed bump, not a wall). Composes nx_money/nx_bills/nx_accommodate. * IMPULSE SHOPPING -> a cooling-off PAUSE on big discretionary buys + reframe the dopamine-buy as concrete cost: HOURS OF YOUR LIFE (amount / wage) and %-of-your-buffer-goal. Over-budget -> WARN. * PLANNING FAILURES -> externalize the executive function: surface an obligation EARLY (lead-time) so nothing is missed; the system plans ahead so the person doesn't have to hold it in working memory. * INACTION LOCKS (task paralysis / "ADHD freeze") -> when the next step feels too big, recommend a 2-minute MICRO first action to drop the activation energy and break the lock. Data-driven (#11): thresholds/budgets/lead-times are DATA. No floats, no hardware writes. license_tier: ORIGINAL

dependencies 2 imports · 7 importers

nx_syscalls.nx nx_money.nx nx_adhd.nx nx_adhd_gate.nx nx_browser_buyguard.nx nx_browser_buyguard_gate.nx nx_finance_web.nx nx_intake_handler_gate.nx nx_purchase.nx nx_purchase_gate.nx

imports: nx_syscalls.nxnx_money.nx

imported by: nx_adhd_gate.nxnx_browser_buyguard.nxnx_browser_buyguard_gate.nxnx_finance_web.nxnx_intake_handler_gate.nxnx_purchase.nxnx_purchase_gate.nx

structs

none

consts

16const ADHD_ALLOW: i64 = 0 // proceed
17const ADHD_PAUSE: i64 = 1 // cooling-off (a reversible speed bump, NOT a block)
18const ADHD_WARN: i64 = 2 // over the discretionary budget -- advise, still the person's call

functions

22func adhd_spend_decision(amount: i64, discretionary: i64, pause_threshold: i64, remaining_budget: i64) -> i64
called by 2: mainpur_recommend
30func adhd_hours_cost(amount_cents: i64, hourly_wage_cents: i64) -> i64
36func adhd_pct_of_goal(amount_cents: i64, goal_cents: i64) -> i64
42func adhd_needs_micro(effort: i64, threshold: i64) -> i64
called by 1: main
49func adhd_surface_ahead(days_until: i64, lead_time: i64) -> i64
called by 1: main