code wiki / _hdl_build / nx_uigen_l3.nx

nx_uigen_l3.nx

buildroot/runtime/_hdl_build/nx_uigen_l3.nx

15097 B269 linesdepth 2pulls 2 transitivereach 6 importersview sourcekind librarytopic uigen
docsdependenciesstructsconstsfunctions

about

nx_uigen_l3.nx -- ROADMAP RUNG L3: PROCEDURAL DESIGN-GRAMMAR. A compact SPEC expands through a deterministic grammar into ONE OF MANY valid, novel page designs: generated palette (seed hue x accent-relation: analogous/ complementary/triadic), radius + density axes, and CONSTRAINED section composition (3..5 middle bands chosen + ordered from a 7-band vocabulary under validity rules: hero first, exactly one CTA last, no duplicates, FAQ never before pricing). Same spec -> same bytes (determinism = the moat); different seeds -> visibly different, ALWAYS-VALID designs. Also the ITERATIVE-REFINE rung: spec-delta commands ("hue 300", "add pricing", "compact", "rounder") mutate the spec and re-emit -- a rule-based v0-chat-loop analog. Grounded: uigss_gendesign.raw / uigss_procgen.raw (constraints -> many valid designs = generative design's core). HONEST scope: bounded vocabulary + templated copy; free component synthesis and NL understanding are L4. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_uigen_l1.nx nx_uigen_l3.nx nx_uigen_l3_gate.nx nx_uigen_refine_gate.nx nx_uigen_site.nx

imports: nx_uigen_l1.nx

imported by: nx_uigen_l3_gate.nxnx_uigen_refine_gate.nxnx_uigen_site.nx

structs

none

consts

12const K_MAGIC_1103515245: i64 = 1103515245
13const K_MAGIC_12345: i64 = 12345
14const K_MAGIC_2147483648: i64 = 2147483648

functions

17func l3_rng_next(st: *i64) -> i64
24func l3_choice(st: *i64, n: i64) -> i64 { let v: i64 = l3_rng_next(st); return v % n }
28func l3_spec_from_seed(spec: *i64, seed: i64) -> i64
65func l3_accent_hue(hue: i64, rel: i64) -> i64
called by 1: l3_palette_style
73func l3_palette_style(buf: *u8, off: i64, hue: i64, rel: i64) -> i64
100func l3_style_mods(buf: *u8, off: i64, radius_idx: i64, density: i64) -> i64
116func l3_sec_features(buf: *u8, off: i64) -> i64
123func l3_sec_split(buf: *u8, off: i64, flip: i64) -> i64
called by 1: l3_emit_section calls 1: sk_split
126func l3_sec_steps(buf: *u8, off: i64) -> i64
133func l3_sec_pricing(buf: *u8, off: i64) -> i64
140func l3_sec_quote(buf: *u8, off: i64) -> i64
called by 1: l3_emit_section calls 1: sk_quote
143func l3_sec_faq(buf: *u8, off: i64) -> i64
150func l3_sec_trust(buf: *u8, off: i64) -> i64
157func l3_emit_section(buf: *u8, off: i64, sec: i64, flip: i64) -> i64
168func l3_emit_from_spec(buf: *u8, off: i64, spec: *i64, title: *u8, brand: *u8) -> i64
187func l3_generate(buf: *u8, off: i64, seed: i64, title: *u8, brand: *u8) -> i64
194func l3_streq(a: *u8, b: *u8) -> i64
200func l3_starts(s: *u8, pre: *u8) -> i64
called by 1: l3_refine
205func l3_atoi_at(s: *u8, at: i64) -> i64
called by 1: l3_refine
215func l3_secid_from_name(s: *u8) -> i64
called by 1: l3_refine calls 1: l3_streq
225func l3_spec_find(spec: *i64, sec: i64) -> i64
called by 1: l3_refine
231func l3_refine(spec: *i64, cmd: *u8) -> i64