code wiki / _hdl_build / nx_site_factory_census.nx
nx_site_factory_census.nx source
↩ module page · 112 lines · 13289 B
1// nx_site_factory_census.nx -- HONEST HAVE-vs-GAP census for the SOVEREIGN SITE FACTORY: the team's
2// capability to AUTONOMOUSLY emit whole s-class-exceed SITES (not just homepages -- full sitemap, shared
3// nav, internal links, the Amazon 3-step conversion flow) from CAPTURED requirements (no LLM, or the
4// smallest one only for context), and PUBLISH them live with rollback BY CONSTRUCTION (deploy without
5// hesitation). Archetypes span brochure -> ecommerce -> social -> video/cam -> game -> resume -> the
6// gallery media-web-app (gen/download/translate/watch/upscale, Jellyfin-class).
7//
8// Same auditor discipline as nx_fin_census: HAVE iff a clean sovereign organ actually OPENS on disk
9// (ax_have opens the REAL file -- no-false-green); GAP = a capability the team must still build, and the
10// GAP row NAMES the exact organ path to create, so this census doubles as the build map. permille =
11// have*1000/tot. This grades COVERAGE (the organ exists), not per-organ correctness -- QUALITY is the
12// later ratchet (existence != full-correctness), exactly like the finmkt census.
13//
14// PLACEMENT (ecosystem, not a fork): the factory ASSEMBLES organs that already exist -- nx_sclass_kit
15// (component library), nx_sitegen/nx_web_builder/nx_site_compose/nx_site_pages (data-driven emitter that
16// already REFUSES any blueprint failing wb_ux_compliant = CTA + on-site search + trust + <=3 steps), the
17// nx_uxcx/ui_judge/ui_exceed graders, and the nx_hostctl/nx_aw_send/nx_proxy_route/nx_fin_serve deploy +
18// rollback spine. The gaps are the ASSEMBLY layer: a whole-site model, funnels, a one-call publisher with
19// auto-revert, a template pattern-corpus, a requirements compiler, and archetype breadth.
20//
21// LADDER the GAP cells map to: R1 whole-site model (nav+links+sitemap emission) -> R2 funnels ->
22// R3 autonomous publish + auto-revert -> R4 pattern corpus (consume templates: structure/flow, not files)
23// -> R5 requirements compiler -> R6 archetype breadth incl. the media-web-app. Composes nx_gate (gw/gn).
24// license_tier: ORIGINAL expect_exit: 0
25import "nx_gate.nx"
26
27func ax_have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0 } sys_close(fd); return 1 }
28func ax(label: *u8, path: *u8, note: *u8) -> i64 {
29 let h: i64=ax_have(path)
30 if h==1 { gw(" [HAVE] " as *u8) } else { gw(" [GAP ] " as *u8) }
31 gw(label); gw(" -> " as *u8); gw(note); gw("\n" as *u8)
32 return h
33}
34
35func main() -> i64 {
36 gw("=== nx_site_factory_census: how much of a SOVEREIGN, AUTONOMOUS, s-class-exceed SITE FACTORY do we HAVE? ===\n" as *u8)
37 gw(" (HAVE = a clean sovereign organ opens on disk; GAP = the team must build it -- GAP rows name the organ. no-false-green.)\n\n" as *u8)
38 var have: i64=0; var tot: i64=0
39
40 gw("-- A. INGEST / PATTERN CORPUS (learn structure+flow from the best templates -- NOT their files/assets) --\n" as *u8)
41 have=have+ax("sovereign TLS fetch (pull templates) " as *u8, "runtime/nx_https_fetch_follow.nx" as *u8, "fetch html5up/etc over our own TLS (no curl); redirect+dechunk" as *u8); tot=tot+1
42 have=have+ax("DOM parse (real mutable tree) " as *u8, "runtime/nx_domtree.nx" as *u8, "dt_parse: HTML bytes -> queryable DOM (structure, not pixels)" as *u8); tot=tot+1
43 have=have+ax("HTML structure/text extract " as *u8, "runtime/nx_html_extract.nx" as *u8, "strip markup, keep IA/text/blocks; links+imgs siblings exist" as *u8); tot=tot+1
44 have=have+ax("external sitemap ingest (mirror IA) " as *u8, "runtime/_hdl_build/nx_site_ingest.nx" as *u8, "already parses foreign sitemaps -- reuse to learn page inventories" as *u8); tot=tot+1
45 have=have+ax("content-addressed corpus store " as *u8, "runtime/nx_seg_store.nx" as *u8, "append-only .docs/.keys -- the pattern/archetype corpus lives here" as *u8); tot=tot+1
46 have=have+ax("canonical CID (auto-dedup patterns) " as *u8, "runtime/nx_canon_cid.nx" as *u8, "canon_encode -> nxc1- sha256 CID; same pattern -> same key" as *u8); tot=tot+1
47 have=have+ax("pattern/archetype EXTRACTOR " as *u8, "runtime/_hdl_build/nx_tpl_ingest.nx" as *u8, "R4: page archetypes + section patterns + FLOWS -> corpus (BUILD)" as *u8); tot=tot+1
48
49 gw("\n-- B. REQUIREMENTS -> BLUEPRINT (capture the need; no LLM, or the smallest one only for context) --\n" as *u8)
50 have=have+ax("site blueprint compiler (.site) " as *u8, "runtime/_hdl_build/nx_site_compose.nx" as *u8, "reads a .site blueprint, dispatches by type| (legal/game/video)" as *u8); tot=tot+1
51 have=have+ax("requirements -> blueprint compiler " as *u8, "runtime/_hdl_build/nx_site_requirements.nx" as *u8, "R5: structured requirements -> a whole-site blueprint (BUILD)" as *u8); tot=tot+1
52 have=have+ax("archetype selection from corpus " as *u8, "runtime/_hdl_build/nx_site_archetype.nx" as *u8, "R5: pick archetype + compose sections from the corpus (BUILD)" as *u8); tot=tot+1
53
54 gw("\n-- C. EMIT (compose s-class-by-construction markup -- the whole site, not one page) --\n" as *u8)
55 have=have+ax("s-class component kit (tokens/a11y) " as *u8, "runtime/nx_sclass_kit.nx" as *u8, "sk_open/hero/section/card/trust/cta/close -- gorgeous by construction" as *u8); tot=tot+1
56 have=have+ax("data-driven page builder " as *u8, "runtime/_hdl_build/nx_web_builder.nx" as *u8, "wb_* emitters; wb_ux_compliant enforces the conversion floor" as *u8); tot=tot+1
57 have=have+ax("site generator (block-walk) " as *u8, "runtime/_hdl_build/nx_sitegen.nx" as *u8, "walks blueprint blocks -> page; REFUSES non-UX-compliant input" as *u8); tot=tot+1
58 have=have+ax("multi-page emitter (index+subpages) " as *u8, "runtime/_hdl_build/nx_site_pages.nx" as *u8, "the ONLY >1-file emitter today: index + practice/<slug> (gated 5/5)" as *u8); tot=tot+1
59 have=have+ax("whole-SITE model (nav + internal links)" as *u8, "runtime/_hdl_build/nx_site_build.nx" as *u8, "R1 DONE: nx_site_build -- shared cross-page nav + <a href> internal links (gated 8/8)" as *u8); tot=tot+1
60 have=have+ax("sitemap.xml generator (library) " as *u8, "runtime/sitemap.nx" as *u8, "Sitemap 0.9 stream builder -- exists, not yet wired to our output" as *u8); tot=tot+1
61 have=have+ax("robots.txt generator (library) " as *u8, "runtime/robots_txt.nx" as *u8, "RFC 9309 builder -- exists, not yet wired to our output" as *u8); tot=tot+1
62 have=have+ax("sitemap/robots EMISSION (wired) " as *u8, "runtime/_hdl_build/nx_site_build.nx" as *u8, "R1 DONE: nx_site_build emits sitemap.xml + robots.txt over the generated page set" as *u8); tot=tot+1
63 have=have+ax("filler content generator (text+media) " as *u8, "runtime/_hdl_build/nx_site_filler.nx" as *u8, "R1: realistic placeholder copy + gen images so no creative assets needed (BUILD)" as *u8); tot=tot+1
64
65 gw("\n-- D. FLOW / CONVERSION FUNNEL (the Amazon 3-step: browse -> detail -> convert) --\n" as *u8)
66 have=have+ax("3-step conversion compliance gate " as *u8, "runtime/_hdl_build/nx_site_pages_gate.nx" as *u8, "wb_ux_compliant proven: CTA + on-site search + trust + <=3 steps" as *u8); tot=tot+1
67 have=have+ax("per-archetype funnel templates " as *u8, "runtime/_hdl_build/nx_site_funnel.nx" as *u8, "R2: browse->detail->cart->checkout, feed->post->profile, browse->watch (BUILD)" as *u8); tot=tot+1
68
69 gw("\n-- E. GRADE (measured s-class, liar-killed -- no self-scored wins) --\n" as *u8)
70 have=have+ax("page UX grader (permille) " as *u8, "runtime/nx_uxcx_grade.nx" as *u8, "11 checks -> permille; the core grader library" as *u8); tot=tot+1
71 have=have+ax("page-dimension grader " as *u8, "runtime/nx_lds_page_grade.nx" as *u8, "runs the 7 page checks on an emitted file -> PAGE permille" as *u8); tot=tot+1
72 have=have+ax("autonomous rubric judge (800 floor) " as *u8, "runtime/nx_ui_judge.nx" as *u8, "DE/US/CR/AX/CO per-dim permille; auto-certify vs 800 floor" as *u8); tot=tot+1
73 have=have+ax("EXCEEDS scorecard (liar-killed) " as *u8, "runtime/nx_ui_exceed.nx" as *u8, "ABSENT/PRESENT/PARITY/EXCEEDS + liar-kill vs a cited benchmark" as *u8); tot=tot+1
74 have=have+ax("s-class lock-in gate (CI) " as *u8, "runtime/nx_ui_ship_gate.nx" as *u8, "per-page pass/fail; composes nx_sclass_enforce_lib invariants" as *u8); tot=tot+1
75 have=have+ax("aesthetic maturity census " as *u8, "runtime/nx_award_ui_census.nx" as *u8, "vs Awwwards/CSSDA/Webby pillars; liar-killed build list" as *u8); tot=tot+1
76 have=have+ax("whole-SITE gate (all pages+nav+map) " as *u8, "runtime/_hdl_build/nx_site_build_gate.nx" as *u8, "R1 DONE: nx_site_build_gate proves whole-site invariants -- nav+links+sitemap+robots (8/8)" as *u8); tot=tot+1
77
78 gw("\n-- F. PUBLISH (autonomous deploy + rollback BY CONSTRUCTION -- deploy without hesitation) --\n" as *u8)
79 have=have+ax("loopback serve daemon (fresh/req) " as *u8, "runtime/nx_fin_serve.nx" as *u8, "serves html FRESH per request -> re-push page, no daemon restart" as *u8); tot=tot+1
80 have=have+ax("asset/binary delivery to NAS " as *u8, "runtime/_hdl_build/nx_aw_send.nx" as *u8, "sovereign SSH stream -> nx_hostctl recv atomic install (no scp)" as *u8); tot=tot+1
81 have=have+ax("rollback-armed supervisor (selfswap) " as *u8, "runtime/_hdl_build/nx_hostctl.nx" as *u8, "atomic swap saves .prev; superrollback; proc match on FULL cmdline" as *u8); tot=tot+1
82 have=have+ax("public edge routing (one line) " as *u8, "runtime/_hdl_build/nx_proxy_route.nx" as *u8, "proxy_routes.conf: host path port mode; longest-prefix, boundary-safe" as *u8); tot=tot+1
83 have=have+ax("one-call WHOLE-SITE publisher " as *u8, "runtime/_hdl_build/nx_site_publish.nx" as *u8, "R3: build->ship->serve->route->verify a whole site tree in one call (BUILD)" as *u8); tot=tot+1
84 have=have+ax("post-publish verify + AUTO-REVERT " as *u8, "runtime/_hdl_build/nx_site_verify_revert.nx" as *u8, "R3: 200 + grade-floor + /health check, auto-revert on regression (BUILD)" as *u8); tot=tot+1
85
86 gw("\n-- G. ARCHETYPE BREADTH (the site TYPES you named -- each an emittable whole-site template) --\n" as *u8)
87 have=have+ax("brochure/landing (drafted: andelinwest)" as *u8, "web_assets/_sites/andelinwest.site" as *u8, "the first named site -- blueprint exists (4 practice pages), unwired" as *u8); tot=tot+1
88 have=have+ax("game site archetype " as *u8, "runtime/_hdl_build/nx_sitegen_game.nx" as *u8, "type|game dispatch already in nx_site_compose" as *u8); tot=tot+1
89 have=have+ax("video site archetype " as *u8, "runtime/_hdl_build/nx_sitegen_video.nx" as *u8, "type|video dispatch already in nx_site_compose" as *u8); tot=tot+1
90 have=have+ax("freeform archetype " as *u8, "runtime/_hdl_build/nx_sitegen_freeform.nx" as *u8, "generic composable page type" as *u8); tot=tot+1
91 have=have+ax("media VERBS substrate (gen/upscale) " as *u8, "runtime/nx_galx_upscale.nx" as *u8, "gen/gather/translate/watch/upscale organs EXIST -- unassembled" as *u8); tot=tot+1
92 have=have+ax("ecommerce archetype (cart->checkout) " as *u8, "runtime/_hdl_build/nx_sitegen_shop.nx" as *u8, "R6: eBay/Etsy/Shein-class flow (BUILD)" as *u8); tot=tot+1
93 have=have+ax("social archetype (feed/profile) " as *u8, "runtime/_hdl_build/nx_sitegen_social.nx" as *u8, "R6: Facebook/Instagram-class flow (BUILD)" as *u8); tot=tot+1
94 have=have+ax("adult/cam archetype (video/meetups) " as *u8, "runtime/_hdl_build/nx_sitegen_cam.nx" as *u8, "R6: Pornhub/Chaturbate/Omegle-class, age-gated (BUILD)" as *u8); tot=tot+1
95 have=have+ax("resume archetype " as *u8, "runtime/_hdl_build/nx_sitegen_resume.nx" as *u8, "R6: personal/resume site (BUILD)" as *u8); tot=tot+1
96 have=have+ax("media-web-app archetype (Jellyfin) " as *u8, "runtime/_hdl_build/nx_sitegen_mediaapp.nx" as *u8, "R6: gallery app -- assemble the existing media verbs into a site (BUILD)" as *u8); tot=tot+1
97
98 let permille: i64=have*1000/tot
99 gw("\n=== SITE FACTORY: " as *u8); gn(have); gw("/" as *u8); gn(tot); gw(" HAVE = " as *u8); gn(permille); gw(" permille ===\n" as *u8)
100 gw("HONEST: the SUBSTRATE is strong -- the component kit, the data-driven emitter (with the conversion\n" as *u8)
101 gw("floor already enforced), the full grader suite, and the deploy+rollback spine all EXIST. What is GAP\n" as *u8)
102 gw("is the ASSEMBLY layer: a whole-SITE model (shared nav + internal links + emitted sitemap), per-archetype\n" as *u8)
103 gw("funnels, a one-call publisher with AUTO-REVERT, a template pattern-corpus, a requirements compiler, and\n" as *u8)
104 gw("archetype breadth. Build order: R1 whole-site model (prove on andelinwest.com) -> R2 funnels ->\n" as *u8)
105 gw("R3 autonomous publish + auto-revert -> R4 corpus -> R5 requirements -> R6 archetypes + nishifamily.com.\n" as *u8)
106 if permille >= 1000 {
107 gw("SITE-FACTORY GREEN -- a sovereign organ for every stage of autonomous whole-site emission + publish.\n" as *u8)
108 sys_exit(0); return 0
109 }
110 gw("SITE-FACTORY HONEST -- strong reusable substrate, greenfield assembly layer; NOT a factory until the rungs land.\n" as *u8)
111 sys_exit(0); return 0
112}