code wiki / _hdl_build / nx_analyst.nx

nx_analyst.nx

buildroot/runtime/_hdl_build/nx_analyst.nx

8346 B181 linesdepth 2pulls 2 transitivereach 10 importersview sourcekind librarytopic analyst
docsdependenciesstructsconstsfunctions

about

nx_analyst.nx -- the NISHI ANALYST organ (the market-researcher RENAMED + given its real job). Operator: "determine why it is so expensive to get an AC when its simpler than a computer and get REAL answers, not regurgitated common wisdoms filled in the media... trace the supply chain costs, the labor cycle, benchmark, to see where all the shenanigans like corruption/inflation are." RACI: the RESEARCHER gathers + corroborates evidence (V_RESEARCH); the ANALYST EXPLAINS it (V_ANALYZE) -- decomposes a measured price into a TRACED COST LEDGER and quantifies what the trace CANNOT explain. The verdict mechanism that kills common-wisdom answers: - a cost claim with no corroborated source is a NARRATIVE node: it is NEVER admitted as a cost, it becomes a fetch-task for the Researcher (media answers are narrative nodes -> 0 admitted); - the ledger must CLOSE arithmetically (children sum to parent within tolerance) -- a story whose numbers don't add up is a defect, not an explanation; - the UNEXPLAINED RESIDUAL (price minus traced costs) is computed and NAMED, never smoothed over: that residual is exactly where margin-stacking / rent-seeking / "shenanigans" live; - verdicts are DETERMINISTIC: same ledger, same verdict, every run (an LLM one-shot varies). Honest boundary (same as nx_researcher.nx): FETCH+EXTRACT of source prose into numbers is the one delegated step; everything that makes the analysis RIGOROUS the team owns and runs. LAWS: struct-free, integer-only (cents / permil / ppm / q10), no &&/||. license_tier: ORIGINAL

dependencies 1 imports · 5 importers

nx_syscalls.nx nx_analyst.nx nx_analyst_case_ac.nx nx_analyst_case_sources.nx nx_analyst_gate.nx nx_analyst_serve.nx nx_ledger_data.nx

imports: nx_syscalls.nx

imported by: nx_analyst_case_ac.nxnx_analyst_case_sources.nxnx_analyst_gate.nxnx_analyst_serve.nxnx_ledger_data.nx

structs

none

consts

20const AN_MAGIC_1000000: i64 = 1000000
21const AN_MAGIC_1024: i64 = 1024
24const AN_NARRATIVE: i64 = 0 // claim with NO corroborated source ("everyone knows installs are pricey")
25const AN_MEASURED: i64 = 1 // value from >=2 independent sources (Researcher rd_corroborated rule)
26const AN_DERIVED: i64 = 2 // computed from measured children (sum/share), provenance inherited
29const AN_EXPLAINED: i64 = 1 // coverage high, residual small -> the price IS its traced costs
30const AN_SHENANIGAN: i64 = 2 // ledger closes, coverage high, residual LARGE -> unexplained money, NAMED
31const AN_UNDERTRACED: i64 = 3 // coverage too low to call -> honest "don't know yet" + fetch tasks owed
32const AN_BROKEN: i64 = 4 // arithmetic does not close, or narrative admitted -> not an explanation

functions

38func an_children_sum(parent: *i64, value: *i64, n: i64, node: i64) -> i64
49func an_is_leaf(parent: *i64, n: i64, node: i64) -> i64
59func an_closure_ppm(node_value: i64, csum: i64) -> i64
called by 1: an_closure_fails
67func an_closure_fails(parent: *i64, value: *i64, n: i64, tol_ppm: i64) -> i64
82func an_narrative_admitted(kind: *i64, value: *i64, n: i64) -> i64
94func an_fetch_tasks_owed(kind: *i64, n: i64) -> i64
called by 1: main
105func an_traced_cents(parent: *i64, value: *i64, kind: *i64, n: i64) -> i64
118func an_traced_permil(price_cents: i64, traced_cents: i64) -> i64
124func an_residual_cents(price_cents: i64, traced_cents: i64) -> i64
128func an_residual_permil(price_cents: i64, traced_cents: i64) -> i64
136func an_verdict(closure_fails: i64, narrative_admitted: i64, traced_permil: i64,
147func an_ledger_verdict(parent: *i64, value: *i64, kind: *i64, n: i64,
159func an_price_per_complexity(price_cents: i64, complexity_units: i64) -> i64
called by 2: an_paradox_q10main
167func an_paradox_q10(price_a: i64, cx_a: i64, price_b: i64, cx_b: i64) -> i64
called by 2: mainmain calls 1: an_price_per_complexity
175func an_is_reproducible(parent: *i64, value: *i64, kind: *i64, n: i64,
called by 2: mainmain calls 1: an_ledger_verdict