code wiki / _hdl_build / nx_uigen_refine.nx

nx_uigen_refine.nx

buildroot/runtime/_hdl_build/nx_uigen_refine.nx

6578 B131 linesdepth 5pulls 12 transitivereach 0 importersview sourcekind tooltopic uigen
docsdependenciesstructsconstsfunctions

about

nx_uigen_refine.nx -- R-refine-live front door: apply ONE spec-delta refine command to a generated site's design and emit the refined INDEX page. The v0 chat-loop analog, rule-based and deterministic: the SAME l3_refine grammar the refine gate measured 8/8 (targeted change + preservation + refusal), lifted to site level -- the spec is derived from the brief exactly as nx_uigen_sitegen derives it, the command mutates one axis, and the page re-emits with the site's real nav + requirements copy intact. usage: nx_uigen_refine <brief> <cmd> <outdir> [title] [brand] [domain] [reqfile] cmds: "hue N" | "accent analog|complement|triad" | "rounder"|"sharper" | "compact"|"airy" | "add <band>" | "drop <band>" (bands: features split steps pricing quote faq trust) An invalid or validity-breaking command is REFUSED loudly (exit 5, nothing written) -- never a silent no-op. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_uigen_site.nx nx_emit_guard.nx nx_uigen_refine.nx

imports: nx_syscalls.nxnx_uigen_site.nxnx_emit_guard.nx

imported by: nobody (leaf or entry point)

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

main rp sys_write sys_exit sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close us_plan l2_has l2_isalpha us_spec us_hash l3_spec_from_seed l3_rng_next l3_choice l3_rng_next ↻ l2_hue l2_has ↻ l3_refine l3_starts l3_atoi_at l3_streq l3_secid_from_name l3_streq ↻ l3_spec_find sys_mkdir eg_buf sys_mmap ↻ eg_say sys_write ↻ sys_exit ↻ rn sys_write ↻ sys_mmap ↻ us_page_index_routed us_family

structs

none

consts

17const K_PAGEBUF: i64 = 1048576
18const K_PATHBUF: i64 = 1024

functions

21func rp(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
22func rjoin(dst: *u8, dir: *u8, name: *u8) -> i64
called by 1: main
33func rn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 }
called by 1: main calls 2: sys_writesys_mmap
35func main(argc: i64, argv: *i64) -> i64