nx_paperbench_cli.nx
buildroot/runtime/nx_paperbench_cli.nx
about
nx_paperbench_cli.nx -- callable MCP/API surface for the sovereign manuscript grader (AS-0).
nx_paperbench score <slack> <bar> <axes_csv> [weights_csv] [mask_csv]
axes = 7 permille scores in canonical order:
claim_evidence,reproducibility,controls,limitations,baseline,data_provenance,stat_honesty
e.g. nx_paperbench score 250 600 1000,1000,200,1000,1000,1000,1000 -> capped 450
nx_paperbench scan <path> <slack> <bar>
reads a REAL manuscript off disk and derives the axes mechanically:
claim_evidence = provenance tokens "[ev:" per numeric claim (digit run)
the other six = presence of the canonical section heading
HONEST SCOPE: section-presence is a REPORTING signal, not a quality signal.
REFORMS (arXiv:2308.07832) is itself a *reporting* standard, so this is the
right tier -- but a present-and-empty section scores the same as a good one.
Judging section CONTENT is the referee stage (AS-2), not the ruler.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_paperbench.nxnx_itoa_lib.nxnx_syscalls.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
| 21 | const K_MAGIC_1048576: i64 = 1048576 |
| 22 | const K_MAGIC_1048560: i64 = 1048560 |
functions
| 24 | func pc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 25 | func pc_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 } |
| 26 | func pc_key(name: *u8) -> i64 { pc_q(); pc_puts(name); pc_q(); pc_puts(":" as *u8); return 0 } |
| 31 | func pc_num(v: i64) -> i64 { nxi_out(v); return 0 } |
| 32 | func pc_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: pc_parse_csv |
| 33 | func pc_atoi(a: *u8) -> i64 called by 1: main |
| 42 | func pc_parse_csv(s: *u8, out: *i64, maxn: i64) -> i64 |
| 54 | func pc_axis_name(i: i64) -> i64 |
| 65 | func pc_tier_name(t: i64) -> i64 |
| 73 | func pc_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 88 | func pc_sec(buf: *u8, n: i64, pat: *u8) -> i64 |
| 92 | func pc_emit(axes: *i64, w: *i64, mk: *i64, slack: i64, bar: i64) -> i64 |
| 120 | func main(argc: i64, argv: *i64) -> i64 |