code wiki / (root) / nx_ux_score.nx

nx_ux_score.nx

buildroot/runtime/nx_ux_score.nx

12219 B292 linesdepth 3pulls 4 transitivereach 2 importersview sourcekind tooltopic ux
docsdependenciesstructsconstsfunctions

about

nx_ux_score.nx -- score a render journal against UX standard clauses. T2 of NISHI_UX_TRIANGULATION_ROADMAP. Takes a RenderJournal (the substrate-honest record of paint intents) and emits a 0..10 score per clause, with per-clause notes citing what evidence justified the score. Substrate is the judge of its OWN UX -- no observing the user, no asking the user, no Claude/operator hand-waving. Scoring heuristics per clause (extensible): NN/g #1 visibility -- count intent labels containing "flash", "breadcrumb_current", "indicator", "status", "current" (each +1, capped at 10). Rationale: the app shows the user where they are + feedback on action. NN/g #6 recognition not recall -- count "breadcrumb_*", "tab", "menu", "label" intents. NN/g #4 consistency -- if the journal exhibits a header/content/ footer pattern (status_bar at bottom + url_bar at top), +5. ISO 9241-110 self-descriptiveness -- journal exists at all? +5. Many semantic labels (>= 12)? +5. Total cap 10. ... etc. Anything not scoreable from the journal alone returns 0 + a note "needs external instrumentation" (queued: nx_event_timeline, nx_attention_signal). API: nx_ux_score_clause(journal, clause_id, note_buf, note_cap) -> 0..10 license_tier: ORIGINAL lineage_id: nishi_ux_score_q10

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_render_journal.nx nx_ux_standard.nx nx_ux_score.nx nx_browser_demo_test.nx nx_ux_triangulate_w3c_kat_test.nx

imports: nx_syscalls.nxnx_render_journal.nxnx_ux_standard.nx

imported by: nx_browser_demo_test.nxnx_ux_triangulate_w3c_kat_test.nx

structs

none

consts

none

functions

38func _ux_str_contains(haystack: *u8, needle: *u8) -> i64
61func _ux_count_intents(j: *RenderJournal, needle: *u8) -> i64
73func _ux_has_exact(j: *RenderJournal, tag: *u8) -> i64
called by 1: nx_ux_score_clause calls 1: _journal_at
95func nx_ux_score_clause(j: *RenderJournal, clause_id: i64,
290func main() -> i64