nx_question_genealogy.nx
buildroot/runtime/nx_question_genealogy.nx
about
nx_question_genealogy.nx -- the why-chain primitive.
Records the chain of refinement questions that motivate each
theorem / primitive. Per QUESTION_GENEALOGY_DOCTRINE: a newcomer's
"why does this matter?" question resolves CONTINUOUSLY from the
layperson root question to the niche specialization, with each
node citing the theorem that answered it and the new sub-question
it opened.
Data structure: a forest of question-trees (DAG, but for now
modeled as parent-pointer tree; one node may be referenced from
multiple children but only one parent is tracked here).
genealogy_id: feynman_motivational_explanation + popper_problem_situations
+ dewey_inquiry_pragmatism
lineage_id: pedagogical_scaffolding + question_tree
axioms: NX_AX_LOGIC_IDENTITY (a question's identity = its phrasing)
dependencies 2 imports · 3 importers
imports: syscalls.nxnx_axioms.nx
imported by: nx_help.nxnx_help_test.nxnx_question_genealogy_test.nx
structs
| 37 | struct QuestionNode |
| 50 | struct QuestionTree |
consts
| 30 | const NX_QG_TIER_ROOT: i64 = 0 // layperson original question |
| 31 | const NX_QG_TIER_REFINEMENT: i64 = 1 // refinement chain |
| 32 | const NX_QG_TIER_NICHE: i64 = 2 // niche specialization |
| 33 | const NX_QG_TIER_OPEN_RESEARCH: i64 = 3 // unanswered frontier |
| 48 | const NX_QG_NODE_BYTES: i64 = 64 |
| 56 | const NX_QG_MAX_NODES: i64 = 4096 |
functions
| 58 | func nx_qg_tree_alloc() -> *QuestionTree |
| 67 | func nx_qg_node_at(t: *QuestionTree, i: i64) -> *QuestionNode |
| 72 | func nx_qg_add_root(t: *QuestionTree, text: *u8) -> i64 |
| 89 | func nx_qg_add_refinement(t: *QuestionTree, parent_id: i64, tier: i64, |
| 114 | func nx_qg_trace_from_root(t: *QuestionTree, target: i64, |
| 140 | func nx_qg_count_by_tier(t: *QuestionTree, tier: i64) -> i64 |
| 152 | func qg_putc(fd: i64, c: i64) -> i64 called by 1: qg_i64 |
| 159 | func qg_str(fd: i64, s: *u8, n: i64) -> i64 called by 1: nx_qg_emit_narrative |
| 164 | func qg_strz(fd: i64, s: *u8) -> i64 called by 1: nx_qg_emit_narrative |
| 171 | func qg_i64(fd: i64, n: i64) -> i64 |
| 195 | func nx_qg_emit_narrative(fd: i64, t: *QuestionTree, target: i64) -> i64 |
| 224 | func nx_qg_seed_corpus(t: *QuestionTree) -> i64 |