code wiki / (root) / nx_doc_census.nx

nx_doc_census.nx

buildroot/runtime/nx_doc_census.nx

23157 B607 linesdepth 7pulls 14 transitivereach 5 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_census.nx -- D1 stone of NISHI_DOCS_DOCTRINE_ROADMAP V2. Bits-up classifier for substrate documentation files. Operation- alizes the V2 header schema introduced in docs doctrine V2: **Quadrant:** (Diátaxis) **Topic Type:** (DITA) **Status:** (lifecycle) **Trust State:** (composes nx_trust_state cardinal) **Competitive State:** (composes nx_competitive_state cardinal) Per [[feedback-docs-above-book-hyper-efficient-structured-delivery]] + [[feedback-audits-are-ecosystem-citizens-not-islands]] cardinals: this audit measures the substrate's own docs against the V2 KPI surface + emits NxEtgEntry into the substrate's attestation chain. Composes: nx_grep (S1; substring pattern detection in doc bytes) nx_string_ops (helpers) nx_etg (NxEtgEntry attestation) nx_trust_state (composed: docs themselves have trust state) nx_competitive_state (composed: docs decay too) **Quadrant:** REFERENCE + EXPLANATION (Diátaxis) **Topic Type:** REFERENCE (DITA) **Status:** DRAFT (D1 first stone) **Trust State:** WRITTEN_UNTESTED (this file is brand-new; not yet KAT-passed; per the never-trust-just-written cardinal) **Competitive State:** UNCLASSIFIED (no benchmark vs Diátaxis- linter / Vale.sh / textlint incumbents yet)

dependencies 6 imports · 5 importers

nx_syscalls.nx nx_string_ops.nx nx_grep.nx nx_grep_rt.nx nx_etg.nx nx_dir.nx nx_doc_census.nx nx_doc_census_real_audit_test.nx nx_doc_census_real_listing_test.nx nx_doc_census_run_test.nx nx_doc_census_test.nx nx_librarian.nx

imports: nx_syscalls.nxnx_string_ops.nxnx_grep.nxnx_grep_rt.nxnx_etg.nxnx_dir.nx

imported by: nx_doc_census_real_audit_test.nxnx_doc_census_real_listing_test.nxnx_doc_census_run_test.nxnx_doc_census_test.nxnx_librarian.nx

structs

195struct NxDocV2Record
232struct NxDocCensusCounts

consts

52const NX_MAGIC_65536: i64 = 65536
53const NX_MAGIC_1024: i64 = 1024
57const NX_DOC_Q_NONE: i64 = 0
58const NX_DOC_Q_TUTORIAL: i64 = 1
59const NX_DOC_Q_HOW_TO: i64 = 2
60const NX_DOC_Q_REFERENCE: i64 = 3
61const NX_DOC_Q_EXPLANATION: i64 = 4
62const NX_DOC_Q_MIXED: i64 = 5
63const NX_DOC_Q_N: i64 = 6
83const NX_DOC_T_NONE: i64 = 0
84const NX_DOC_T_CONCEPT: i64 = 1
85const NX_DOC_T_TASK: i64 = 2
86const NX_DOC_T_REFERENCE: i64 = 3
87const NX_DOC_T_PATTERN: i64 = 4
88const NX_DOC_T_EXPLANATION: i64 = 5
89const NX_DOC_T_N: i64 = 6
109const NX_DOC_S_NONE: i64 = 0
110const NX_DOC_S_DRAFT: i64 = 1
111const NX_DOC_S_CANONICAL: i64 = 2
112const NX_DOC_S_SUPERSEDED: i64 = 3
113const NX_DOC_S_DEPRECATED: i64 = 4
114const NX_DOC_S_N: i64 = 5

functions

65func nx_doc_q_is_valid(q: i64) -> i64
called by 1: main
71func nx_doc_q_name(q: i64) -> *u8
91func nx_doc_t_is_valid(t: i64) -> i64
called by 1: main
97func nx_doc_t_name(t: i64) -> *u8
116func nx_doc_s_is_valid(s: i64) -> i64
called by 1: main
122func nx_doc_s_name(s: i64) -> *u8
137func nx_doc_classify_quadrant(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
147func nx_doc_classify_topic_type(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
156func nx_doc_classify_status(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
166func nx_doc_has_trust_state(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
171func nx_doc_has_competitive_state(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
179func nx_doc_has_websearch_provenance(content: *u8, n: i64) -> i64
called by 2: nx_doc_classifymain calls 1: nx_grep_any
206func nx_doc_classify(
245func nx_doc_census_init(c: *NxDocCensusCounts)
258func nx_doc_census_accumulate(c: *NxDocCensusCounts, r: *NxDocV2Record) -> i64
274func nx_doc_census_pct_compliance(c: *NxDocCensusCounts) -> i64
291func nx_doc_census_to_etg_outcome(c: *NxDocCensusCounts) -> i64
299func nx_doc_census_attest(
330func _doccensus_path_join(
362func nx_doc_census_walk_dir(
463func _docc_write_kv(label: *u8, n_label: i64, value: i64)
473func _docc_write_outcome(outcome: i64)
488func nx_doc_census_report_stdout(c: *NxDocCensusCounts)
513func _docc_write_doc_line(name: *u8, n_name: i64, score: i64)
528func nx_doc_census_walk_dir_listing(