nx_idea_genealogist.nx
buildroot/runtime/nx_idea_genealogist.nx
about
nx_idea_genealogist.nx -- the IDEA/ATTRIBUTION genealogist (top-down): records WHO/WHAT/WHERE/
WHY/WHEN/HOW an insight came from and the idea->idea chain that produced it, then BRIDGES each
idea into the bottom-up code/math tree via realized_in (an id that must resolve in lineage.tsv
or math_genealogy.tsv). Sibling to nx_math_genealogist / nx_oracle_genealogist / nx_genesis_lineage.
AUTHOR=ORGAN: this organ authors the registry rows; Claude does NOT hand-write idea_genealogy.tsv.
The 5W1H + edges are SOURCED DATA in knowledge/specs/idea_genealogy.spec.tsv (transcribed from
well-established public attributions). This organ, modelled on nx_genesis_lineage:
1. reads the spec (field delimiter '|', rewritten to TAB on emit),
2. loads idea_ids already in idea_genealogy.tsv (idempotency: present idea = SKIPPED),
3. loads the BRIDGE universe = lineage.tsv field0 (child ids) + math_genealogy.tsv field1 (foundation ids),
4. validates each row and REFUSES only a real lie -- a broken descends_from (idea-chain to
nothing) or a SOURCED row with an empty source (fabricated citation). An unresolved
realized_in is NOT refused: it is a RECORD-HINT that names a no-orphans gap.
5. appends the surviving rows to idea_genealogy.tsv and logs an IDEAGENEAL verdict.
Idempotent (rerun = emitted=0 skipped=N), additive-only (append, never overwrite -- rule 13).
Sovereign syscalls only.
module: nishi-core.genealogy.idea_genealogist
capability: GENEALOGY
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| 23 | const IG_MAGIC_8192: i64 = 8192 |
| 24 | const IG_MAGIC_1048576: i64 = 1048576 |
| 25 | const IG_MAGIC_1048575: i64 = 1048575 |
| 26 | const IG_MAGIC_262144: i64 = 262144 |
| 27 | const IG_MAGIC_262143: i64 = 262143 |
| 28 | const IG_MAGIC_1024: i64 = 1024 |
| 30 | const IG_SPEC: *u8 = "knowledge/specs/idea_genealogy.spec.tsv" |
| 31 | const IG_OUT: *u8 = "knowledge/registry/idea_genealogy.tsv" |
| 32 | const IG_LIN: *u8 = "knowledge/registry/lineage.tsv" |
| 33 | const IG_MATHG: *u8 = "knowledge/registry/math_genealogy.tsv" |
| 34 | const IG_LOG: *u8 = "knowledge/status/idea_genealogy.log" |
| 35 | const IG_IDCAP: i64 = 64 |
functions
| 37 | func ig_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 38 | func ig_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48 as u8;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 41 | func ig_wheader(fd: i64) -> i64 |
| 60 | func ig_streq(a: *u8, b: *u8) -> i64 |
| 66 | func ig_in_set(arena: i64, cnt: i64, idcap: i64, name: *u8) -> i64 |
| 73 | func ig_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8, outcap: i64) -> i64 called by 1: main |
| 93 | func ig_desc_valid(parents: *u8, ea: i64, ec: i64, ba: i64, bc: i64, idcap: i64) -> i64 |
| 122 | func ig_bridge(realized: *u8, br: i64, brc: i64, idcap: i64) -> i64 |
| 156 | func ig_append(fd: i64, buf: *u8, ls: i64, le: i64) -> i64 |
| 171 | func ig_load_field(path: *u8, fidx: i64, arena: i64, base: i64, idcap: i64, maxc: i64) -> i64 |
| 223 | func ig_report(fd: i64, nl: i64, emitted: i64, skipped: i64, refused: i64, hints: i64, bridged: i64, credit_only: i64, epoch: i64, ok: i64) -> i64 |
| 236 | func main(argc: i64, argv: *i64) -> i64 |