code wiki / _hdl_build / nx_web_builder.nx
nx_web_builder.nx
buildroot/runtime/_hdl_build/nx_web_builder.nx
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
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
| 21 | const WB_MAX_STEPS: i64 = 3 // operator's <=3-step rule (cited decision-fatigue research) |
functions
| 24 | func wb_steps_ok(n_steps: i64) -> i64 { if n_steps < 1 { return 0 } if n_steps > WB_MAX_STEPS { return 0 } return 1 } |
| 25 | func wb_ux_compliant(n_steps: i64, has_cta: i64, has_search: i64, n_trust: i64) -> i64 |
| 33 | func wb_ux_grade(n_steps: i64, has_cta: i64, has_search: i64, n_trust: i64, responsive: i64) -> i64 |
| 44 | func 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 } |
| 51 | func wb_doc_open_branded(fd: i64, title: *u8, brand: *u8, blen: i64) -> i64 called by 15: g_buildbb_emitmainbuild_brandedmaing_build+9 calls 5: wb_wbas_emit_headbt_emit_root_fdbt_emit_dark_fdpol_emit |
| 79 | func wb_doc_open(fd: i64, title: *u8) -> i64 called by 14: mainbuilder_build_andelinwestmainbuild_defaultmainmain+8 calls 3: bt_default_brandwb_doc_open_brandedbt_len |
| 83 | func wb_doc_close(fd: i64) -> i64 { wb_w(fd, "</body></html>\n" as *u8); return 0 } |
| 85 | func wb_header(fd: i64, brand: *u8, cta_label: *u8, cta_href: *u8) -> i64 |
| 90 | func wb_hero(fd: i64, headline: *u8, sub: *u8, cta_label: *u8, cta_href: *u8) -> i64 |
| 95 | func wb_search(fd: i64, action: *u8, placeholder: *u8) -> i64 |
| 100 | func 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 } |
| 101 | func wb_card(fd: i64, title: *u8, body: *u8) -> i64 |
| 104 | func wb_cards_close(fd: i64) -> i64 { wb_w(fd, "</div></section>\n" as *u8); return 0 } |
| 107 | func wb_steps(fd: i64, heading: *u8, labels: *i64, n: i64) -> i64 |
| 119 | func wb_trust(fd: i64, signals: *i64, n: i64) -> i64 |
| 125 | func wb_footer(fd: i64, text: *u8) -> i64 { wb_w(fd, "<footer><div class=\"wrap\">" as *u8); wb_w(fd, text); wb_w(fd, "</div></footer>\n" as *u8); return 0 } |
| 129 | func 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 } |
| 130 | func 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 } |
| 131 | func wb_faq_close(fd: i64) -> i64 { wb_w(fd, "</section>\n" as *u8); return 0 } |
| 133 | func wb_gallery_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=\"gallery\">\n" as *u8); return 0 } |
| 134 | func wb_gallery_item(fd: i64, src: *u8, alt: *u8) -> i64 { wb_w(fd, "<img src=\"" as *u8); wb_w(fd, src); wb_w(fd, "\" alt=\"" as *u8); wb_w(fd, alt); wb_w(fd, "\" loading=\"lazy\">\n" as *u8); return 0 } |
| 135 | func wb_gallery_close(fd: i64) -> i64 { wb_w(fd, "</div></section>\n" as *u8); return 0 } |
| 137 | func wb_cta(fd: i64, heading: *u8, sub: *u8, label: *u8, href: *u8) -> i64 |