nx_antipattern_catalog.nx
buildroot/runtime/nx_antipattern_catalog.nx
about
nx_antipattern_catalog.nx -- THE SOVEREIGN ANTI-PATTERN CATALOG + LIVE MECHANICAL SCANNER.
Operator: "grab a FULL and I mean full comprehensive list of anti-patterns, dark patterns, bad shapes,
wrong shapes ... these are well documented if you use nishi researcher + census + auditor ... AND our OWN
anti-patterns like 3rd-party formats/tools/license/patent/legal issues -- truly independent, our own
hardware sensors..supercomputers." This is the REPORT-step VOCABULARY of the autonomy loop, made sovereign.
GROUNDED (Rule 4): the researcher (nx_research_fetch) banked 20 authoritative sources into
knowledge/fetched/ap_*.raw; a census/synth pass distilled 162 patterns -> durably banked at
knowledge/registry/antipattern_catalog_synth_2026-07-03.json. THIS organ is the LIVE tier: (1) the
canonical registry (data-driven rows, expandable -- Cardinal 11), and (2) a MECHANICAL SCANNER that PROVES
anti-patterns in a real target file (open it + detect fingerprints) -- the prove-not-assert discipline, the
same as nx_rung_eval. Two tiers: MECHANICAL (here, always-on, grep/scan-detectable) vs SEMANTIC (the deep
LLM-auditor tier; those rows are reference vocabulary only -- flagged mechanically_detectable=NO).
COMPOSES not duplicates (Cardinal 15): magic-number detection reuses the proven nx_magicnum_benchmark
algorithm; god-function/complexity thresholds live in nx_quality_grade; circular-dep is nx_dep_graph SCC;
sovereignty (patent/license/3rd-party) composes nx_license_wall_audit + nx_patent_check + nx_self_audit.
license_tier: ORIGINAL genealogy_id: international-research-sources/{anti-pattern,code-smell,dark-pattern,owasp,solid} + operator-2026-07-03
lineage_id: nishi_antipattern_catalog_v1 expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_dir.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 23 | const AP_MAGIC_2026: i64 = 2026 |
| 25 | const AP_BUF: i64 = 1048576 |
| 26 | const AP_SWEEP_CAP: i64 = 16384 // max dir entries enumerated per sweep (runtime/ is large) |
functions
| 29 | func AP_CAT_CODE_SMELL() -> *u8 { return "CODE_SMELL\x00" as *u8 } called by 1: main |
| 30 | func AP_CAT_ARCH() -> *u8 { return "ARCHITECTURAL\x00" as *u8 } called by 1: main |
| 31 | func AP_CAT_DARK() -> *u8 { return "DARK_PATTERN\x00" as *u8 } called by 1: main |
| 32 | func AP_CAT_SECURITY() -> *u8 { return "SECURITY\x00" as *u8 } |
| 33 | func AP_CAT_CONCURRENCY() -> *u8 { return "CONCURRENCY\x00" as *u8 } |
| 34 | func AP_CAT_DESIGN() -> *u8 { return "DESIGN_PRINCIPLE_VIOLATION\x00" as *u8 } |
| 35 | func AP_CAT_SOVEREIGNTY() -> *u8 { return "NISHI_SOVEREIGNTY\x00" as *u8 } // OUR OWN category (operator ask) called by 1: main |
| 36 | func AP_CAT_INCOMPLETE() -> *u8 { return "INCOMPLETE_WORK\x00" as *u8 } // orphan/stub -> route to queue called by 1: main |
| 37 | func AP_CAT_RESOURCE() -> *u8 { return "RESOURCE_WASTE\x00" as *u8 } // Cardinal 21: the GC-free leak-by-construction class (AP_MAGIC_2026-07-05 OOM arc) called by 1: main |
| 39 | func ap_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 40 | func ap_putn(v: i64) -> i64 |
| 47 | func ap_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 48 | func ap_is_digit(c: u8) -> i64 { if c >= (48 as u8) { if c <= (57 as u8) { return 1 } } return 0 } called by 1: ap_count_code |
| 49 | func ap_is_alnum_us(c: u8) -> i64 called by 1: ap_count_code |
| 61 | func ap_count_marker(buf: *u8, total: i64, needle: *u8) -> i64 |
| 83 | func ap_count_code(buf: *u8, total: i64, needle: *u8) -> i64 |
| 111 | func ap_count_mmap_in_loop(buf: *u8, total: i64) -> i64 |
| 163 | func ap_count(buf: *u8, total: i64, needle: *u8) -> i64 |
| 177 | func ap_match_at(buf: *u8, i: i64, total: i64, lit: *u8) -> i64 |
| 183 | func ap_count_magic(buf: *u8, total: i64) -> i64 |
| 210 | func ap_read(path: *u8, buf: *u8) -> i64 |
| 219 | func ap_row(name: *u8, cat: *u8, detectable: *u8, cardinal: *u8) -> i64 |
| 227 | func ap_scan_file(path: *u8) -> i64 |
| 269 | func ap_sovereign_scan(path: *u8, verbose: i64) -> i64 |
| 314 | func ap_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } |
| 316 | func main(argc: i64, argv: *i64) -> i64 |