code wiki / _hdl_build / nx_wiki_products_page.nx
nx_wiki_products_page.nx source
↩ module page · 141 lines · 9875 B
1// nx_wiki_products_page.nx -- ★SUPERSEDED 2026-08-01 by nx_product_board. DOES NOT WRITE ANY MORE.
2//
3// RETRACTION (debt 1785625149): the header below claimed this page was "Sourced from
4// knowledge/registry/product_catalog.tsv" and the RENDERED PAGE repeated that claim to readers. It was
5// false. This organ contained no file read of any kind -- all 10 families and their representative
6// products were hardcoded string literals in the pr_row calls, so every edit to the catalog was
7// invisible here. A header that describes a capability the code does not have is itself a live defect.
8//
9// The replacement, nx_product_board, reads the `products-` information plane and derives families from
10// the data, so a new product or family costs ONE row and no code.
11//
12// WHY THIS FILE FAILS CLOSED INSTEAD OF BEING DELETED: it wrote web_assets/products.html, which a
13// publish step copies onto the live /wiki/products.html. Left runnable, ANY scheduled beat that still
14// calls it would silently overwrite the plane-driven board with the hardcoded one -- a revert that
15// looks like a successful run. It now refuses loudly and writes nothing, so a stale caller surfaces
16// itself instead of quietly undoing the fix.
17//
18// ORIGINAL HEADER, kept for provenance and NO LONGER TRUE:
19// nx_wiki_products_page.nx -- GENERATE the live "Products" wiki article, a TYPED Diataxis REFERENCE page
20// built through the sovereign page builder (nx_wiki_shell) so it clears the full MediaWiki feature bar
21// (measured by nx_wiki_exceed). It is the catalog index: the ~62 products organized into 10 families from
22// knowledge/registry/product_catalog.tsv, each with the governance contract it inherits. Walkable: full
23// walk furniture via nx_wiki_shell. Emits web_assets/products.html (-> nishifamily.com/wiki/products.html).
24// license_tier: ORIGINAL
25
26import "nx_syscalls.nx"
27import "nx_wiki_shell.nx"
28
29const PR_OUT: *u8 = "web_assets/products.html"
30const PR_CAP: i64 = 262144
31
32// HTML-escape dynamic text.
33func pr_cat_esc(dst: *u8, off: i64, s: *u8) -> i64 {
34 var o: i64 = off; var i: i64 = 0
35 while s[i] != 0 as u8 {
36 let c: u8 = s[i]
37 if c == 60 as u8 { o = sh_cat(dst, o, "<" as *u8) }
38 else { if c == 62 as u8 { o = sh_cat(dst, o, ">" as *u8) }
39 else { if c == 38 as u8 { o = sh_cat(dst, o, "&" as *u8) }
40 else { dst[o] = c; o = o + 1 } } }
41 i = i + 1
42 }
43 return o
44}
45
46// one family row: name, count summary, representative products, governance.
47func pr_row(dst: *u8, off: i64, fam: *u8, items: *u8, gov: *u8) -> i64 {
48 var w: i64 = off
49 w = sh_cat(dst, w, "<tr><td><strong>" as *u8); w = pr_cat_esc(dst, w, fam)
50 w = sh_cat(dst, w, "</strong></td><td>" as *u8); w = pr_cat_esc(dst, w, items)
51 w = sh_cat(dst, w, "</td><td>" as *u8); w = pr_cat_esc(dst, w, gov)
52 w = sh_cat(dst, w, "</td></tr>\n" as *u8)
53 return w
54}
55
56func main() -> i64 {
57 // FAIL-CLOSED SUPERSESSION (2026-08-01). Writing here would clobber the plane-driven board that
58 // nx_product_board renders. Refuse, name the successor, and exit non-zero so a stale caller is a
59 // LOUD failure rather than a silent revert of a shipped fix.
60 sys_write(2, "nx_wiki_products_page: SUPERSEDED by nx_product_board (reads the products- plane). This organ hardcoded its families and never read the catalog it claimed to read (debt 1785625149). Refusing to write web_assets/products.html. Run: nx_product_board\n" as *u8, 247)
61 sys_exit(4)
62 return 4
63}
64
65func pr_main_retired() -> i64 {
66 let now: i64 = sys_now_realtime_sec()
67 let h: *u8 = sys_mmap(PR_CAP)
68 var w: i64 = 0
69
70 let wl: *NxWikiLinks = sys_mmap(128) as *NxWikiLinks
71 sh_links_load(wl, "knowledge/registry/wiki_links.tsv" as *u8)
72 let store: *NxWikiDocStore = sh_corpus_store()
73
74 w = sh_head(h, w, "Products" as *u8, "products" as *u8)
75 w = sh_nav(h, w, "products" as *u8)
76 w = sh_walk_furniture(h, w, wl, store, "products" as *u8)
77
78 w = sh_cat(h, w, "<h1>Product Catalog</h1>\n" as *u8)
79 w = sh_cat(h, w, "<p class=\"fresh\">⟳ Generated LIVE by <code>nx_wiki_products_page</code> at epoch=" as *u8)
80 w = sh_catn(h, w, now)
81 w = sh_cat(h, w, " — a Diataxis <strong>reference</strong> page. Sourced from <code>knowledge/registry/product_catalog.tsv</code>.</p>\n" as *u8)
82
83 w = sh_cat(h, w, "<p class=\"lede\">Everything the ecosystem builds is catalogued into <strong>10 families</strong> (~62 products), each carrying the governance it inherits — consent, provenance, anti-exploit, no-overclaim. The thesis throughout: honest data and understanding <strong>defend regular people</strong>; the answer to bad results is always better data, never fewer options.</p>\n" as *u8)
84
85 w = sh_infobox_open(h, w, "Product Catalog" as *u8)
86 w = sh_infobox_row(h, w, "Type" as *u8, "Reference" as *u8)
87 w = sh_infobox_row(h, w, "Families" as *u8, "10" as *u8)
88 w = sh_infobox_row(h, w, "Products" as *u8, "~62" as *u8)
89 w = sh_infobox_row(h, w, "Source" as *u8, "product_catalog.tsv" as *u8)
90 w = sh_infobox_row(h, w, "Live now" as *u8, "EconSim, Vizsla, Meaningful Notes" as *u8)
91 w = sh_infobox_close(h, w)
92
93 w = sh_toc_open(h, w)
94 w = sh_toc_item(h, w, "families" as *u8, "The 10 families" as *u8)
95 w = sh_toc_item(h, w, "live" as *u8, "Live now" as *u8)
96 w = sh_toc_item(h, w, "refs" as *u8, "References & evidence" as *u8)
97 w = sh_toc_close(h, w)
98
99 w = sh_section(h, w, "families" as *u8, "The 10 families" as *u8)
100 w = sh_cat(h, w, "<table><tr><th>Family</th><th>Representative products</th><th>Governance inherited</th></tr>\n" as *u8)
101 w = pr_row(h, w, "Civic empowerment" as *u8, "medical-billing decoder, utility-bills, taxes, election-transparency, grow-vs-buy" as *u8, "decision-support + no-overclaim + anti-exploit" as *u8)
102 w = pr_row(h, w, "Financial literacy" as *u8, "debt payoff, compound-interest, credit/loans/mortgages, predatory-finance defense" as *u8, "decision-support + no-overclaim + anti-exploit" as *u8)
103 w = pr_row(h, w, "Media / companion" as *u8, "universal-capture, avatar-embodiment, voice-licensing, Elara elder companion" as *u8, "consent-for-likeness + provenance + explicit->local-lane" as *u8)
104 w = pr_row(h, w, "Community" as *u8, "Nishi Connect interest-groups, nishi-social + nishi-ads" as *u8, "anti-addiction + consent + anti-blackmail" as *u8)
105 w = pr_row(h, w, "Physical / maker" as *u8, "indoor growing systems, root-growing bags, DIY tech-packs" as *u8, "real-costs honest + intelligent-design" as *u8)
106 w = pr_row(h, w, "Education / serious games" as *u8, "Capitalism-Lab (EconSim), real-or-synthetic data engine" as *u8, "learn-for-real + FAIR-F2P + anti-exploit" as *u8)
107 w = pr_row(h, w, "AI sovereignty" as *u8, "spore-seed model regeneration, local catalogue, on-device training, distributed shards" as *u8, "CID-provenance + consent + sovereign + VRAM-budget" as *u8)
108 w = pr_row(h, w, "Substrate" as *u8, "the team/orchestra, math-engine + kernel-up + drivers, universal-capture core" as *u8, "gated everywhere + no-cheat + meter-integrity" as *u8)
109 w = pr_row(h, w, "Personal assistant (Vizsla)" as *u8, "budget, bills, jobs, recruiter-channel, PRM, daily digest (many DONE+gated)" as *u8, "additive-history + tamper-evidence + no-overclaim" as *u8)
110 w = pr_row(h, w, "Meaningful notes" as *u8, "event-anchored timed notes, occasions engine, multi-tenant SaaS, fulfillment" as *u8, "timed-release + human-sends-outward + no-auto-send" as *u8)
111 w = sh_cat(h, w, "</table>\n" as *u8)
112 w = sh_cat(h, w, "<p class=\"why\">Each product inherits its family's governance contract by construction — the apps phase reads <code>product_catalog.tsv</code> to know what is being built and to what contract, so the rules travel with the product.</p>\n" as *u8)
113
114 w = sh_section(h, w, "live" as *u8, "Live now" as *u8)
115 w = sh_cat(h, w, "<p>Products already live or DONE+gated:</p>\n<ul>" as *u8)
116 w = sh_cat(h, w, "<li><a href=\"/econsim\">EconSim</a> — in-browser economy game (R0 + R1 gates GREEN) — see the <a href=\"/wiki/econsim.html\">tutorial</a></li>" as *u8)
117 w = sh_cat(h, w, "<li><strong>Vizsla</strong> personal assistant — budget / bills / jobs / PRM / daily digest, gated GREEN</li>" as *u8)
118 w = sh_cat(h, w, "<li><strong>Meaningful Notes</strong> — event-anchored timed notes + occasions engine, gated GREEN</li>" as *u8)
119 w = sh_cat(h, w, "</ul>\n" as *u8)
120 w = sh_cat(h, w, "<p><a href=\"/wiki/roadmap.html\">See the roadmap for what is next →</a> · <a href=\"/wiki/board.html\">The workstream board →</a></p>\n" as *u8)
121
122 w = sh_refs_open(h, w)
123 w = sh_cat(h, w, "<li><code>knowledge/registry/product_catalog.tsv</code> — the organized catalog (family | product | arc | status | governance)</li>\n" as *u8)
124 w = sh_cat(h, w, "<li><a href=\"/wiki/econsim.html\">EconSim tutorial</a> — the live serious game</li>\n" as *u8)
125 w = sh_cat(h, w, "<li><a href=\"/wiki/board.html\">Workstream board</a> — the empires these products roll up into</li>\n" as *u8)
126 w = sh_refs_close(h, w)
127
128 w = sh_footer_wl(h, w, wl, "products" as *u8, now)
129
130 let fd: i64 = sys_openat_wr(PR_OUT, 0x1a4)
131 if fd < 0 { sys_write(2, "FATAL: cannot open products.html\n" as *u8, 33); sys_exit(2); return 2 }
132 sys_write(fd, h, w)
133 sys_close(fd)
134 sys_write(1, "[nx_wiki_products_page] wrote products.html bytes=" as *u8, 50)
135 let nb: *u8 = sys_mmap(28); var k2: i64 = 0; var m2: i64 = w
136 if m2 == 0 { nb[0] = 48 as u8; k2 = 1 }
137 while m2 > 0 { nb[k2] = (48 + (m2 % 10)) as u8; m2 = m2 / 10; k2 = k2 + 1 }
138 var q: i64 = k2 - 1; while q >= 0 { let o1: *u8 = sys_mmap(1); o1[0] = nb[q]; sys_write(1, o1, 1); q = q - 1 }
139 sys_write(1, "\n" as *u8, 1)
140 sys_exit(0); return 0
141}