code wiki / _hdl_build / nx_web_builder.nx

nx_web_builder.nx

buildroot/runtime/_hdl_build/nx_web_builder.nx

11592 B141 linesdepth 3pulls 5 transitivereach 60 importersview sourcekind librarytopic web
docsdependenciesstructsconstsfunctions

about

nx_web_builder.nx -- a TEAM CAPABILITY: build UX-compliant responsive websites from a SPEC (operator: "build the team's capability to build", not a one-off page). The cited UX/CX research is BAKED INTO the generator, so every site it produces is compliant by construction and it REFUSES a spec that violates the rules: - <= 3 resolution steps (decision-fatigue; the "3-click rule" is debunked so it's about step COUNT + clarity, knowledge/research/2026-06-04-website-ux-andelinwest.md) - a clear, obvious primary CTA (Doherty < 400ms feel; value clear within 10s) - responsive by construction (mobile-first viewport + fluid grid baked into wb_doc_open) - onsite search present (wired to the team's BM25/PPMI) - trust/credibility signals (Fogg: ~75% judge credibility from design) The team feeds it andelinwest's spec to build that site, and a different spec to build the next lawyer/doctor/ecommerce site (the shadow-clone reuse). Content strings are the caller's (the legal PROSE is the flagged LLM-gap); the STRUCTURE + UX + responsiveness are the team's, bits-up. license_tier: ORIGINAL Emit is raw sys_write -> sovereign, no template engine, no third-party.

dependencies 4 imports · 24 importers

nx_syscalls.nx nx_brand_tokens.nx nx_brand_polish.nx nx_brand_assets.nx nx_web_builder.nx nx_andelinwest_build.nx nx_andelinwest_crew.nx nx_aw_roadmap_page.nx nx_brand_assets_gate.nx nx_brand_book.nx nx_brand_builder_gate.nx nx_brand_dark_gate.nx nx_brand_exceed2_gate.nx nx_brand_packs_gate.nx nx_brand_polish_gate.nx

diagram shows first 10 each side; +0 more imports, +14 more importers in the complete lists below.

imports: nx_syscalls.nxnx_brand_tokens.nxnx_brand_polish.nxnx_brand_assets.nx

imported by: nx_andelinwest_build.nxnx_andelinwest_crew.nxnx_aw_roadmap_page.nxnx_brand_assets_gate.nxnx_brand_book.nxnx_brand_builder_gate.nxnx_brand_dark_gate.nxnx_brand_exceed2_gate.nxnx_brand_packs_gate.nxnx_brand_polish_gate.nxnx_ecosystem_doc.nxnx_library_page.nxnx_library_publish.nxnx_library_scholarly.nxnx_meet_about.nxnx_meet_emit.nxnx_meet_intake.nxnx_meet_jobs.nxnx_portal_builder.nxnx_pub_todos.nxnx_site_generator.nxnx_site_migrate.nxnx_sitegen.nxnx_web_builder_test.nx

structs

none

consts

21const WB_MAX_STEPS: i64 = 3 // operator's <=3-step rule (cited decision-fatigue research)

functions

24func wb_steps_ok(n_steps: i64) -> i64 { if n_steps < 1 { return 0 } if n_steps > WB_MAX_STEPS { return 0 } return 1 }
25func wb_ux_compliant(n_steps: i64, has_cta: i64, has_search: i64, n_trust: i64) -> i64
33func wb_ux_grade(n_steps: i64, has_cta: i64, has_search: i64, n_trust: i64, responsive: i64) -> i64
called by 4: mainmainsg_grademain calls 1: wb_steps_ok
44func wb_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return n }
51func wb_doc_open_branded(fd: i64, title: *u8, brand: *u8, blen: i64) -> i64
79func wb_doc_open(fd: i64, title: *u8) -> i64
83func wb_doc_close(fd: i64) -> i64 { wb_w(fd, "</body></html>\n" as *u8); return 0 }
85func wb_header(fd: i64, brand: *u8, cta_label: *u8, cta_href: *u8) -> i64
90func wb_hero(fd: i64, headline: *u8, sub: *u8, cta_label: *u8, cta_href: *u8) -> i64
100func wb_cards_open(fd: i64, heading: *u8) -> i64 { wb_w(fd, "<section class=\"wrap\"><h2>" as *u8); wb_w(fd, heading); wb_w(fd, "</h2><div class=\"cards\">\n" as *u8); return 0 }
101func wb_card(fd: i64, title: *u8, body: *u8) -> i64
104func wb_cards_close(fd: i64) -> i64 { wb_w(fd, "</div></section>\n" as *u8); return 0 }
107func wb_steps(fd: i64, heading: *u8, labels: *i64, n: i64) -> i64
119func wb_trust(fd: i64, signals: *i64, n: i64) -> i64
129func wb_faq_open(fd: i64, heading: *u8) -> i64 { wb_w(fd, "<section class=\"wrap faq\"><h2>" as *u8); wb_w(fd, heading); wb_w(fd, "</h2>\n" as *u8); return 0 }
called by 1: sg_build_page calls 1: wb_w
130func wb_faq_item(fd: i64, q: *u8, a: *u8) -> i64 { wb_w(fd, "<details><summary>" as *u8); wb_w(fd, q); wb_w(fd, "</summary><p>" as *u8); wb_w(fd, a); wb_w(fd, "</p></details>\n" as *u8); return 0 }
called by 1: sg_build_page calls 1: wb_w
131func wb_faq_close(fd: i64) -> i64 { wb_w(fd, "</section>\n" as *u8); return 0 }
called by 1: sg_build_page calls 1: wb_w
137func wb_cta(fd: i64, heading: *u8, sub: *u8, label: *u8, href: *u8) -> i64
called by 3: mainmainsg_build_page calls 1: wb_w