nx_atlas_traits.nx
buildroot/runtime/nx_atlas_traits.nx
about
nx_atlas_traits.nx -- the EXTENSIBLE trait engine for the Living Capability Atlas.
Operator 2026-07-17: "full atlas scope immediately" + "make sure its extensible too on these traits
and other things so we dont get locked in and can grow them."
DESIGN = ANTI-LOCK-IN BY CONSTRUCTION. Nothing about the trait set, the node kinds, or the computation
methods is hardcoded into the card struct. They are DATA-DRIVEN REGISTRIES:
* TRAIT REGISTRY -- each trait = (key, axis, computed_by, applies_to_kinds, glyph). Grow it by
adding ONE row (tr_def below) + optionally ONE dispatch arm. The GRADER LOOP IS
GENERIC over the registry -- it never names a specific trait.
* KIND REGISTRY -- node kinds span digital-organ + physical + STEM + bio + product + workflow +
agent (open enum; add a row). Full-scope from day one.
* CARD -- an OPEN trait-set (key->value bag), NOT fixed columns. Any registered trait
attaches to any applicable node. New traits appear on old cards for free.
* COMPUTED_BY -- a small dispatch (cb_eval): DISK / ALLOWLIST / POLICY today; MATERIAL / PROOF /
BIO / WMS / CREW / SWARM declared-but-pending (honest: a trait can exist in the
registry before its data source does -- that IS the growth path, not a blocker).
So the atlas grows by editing DATA (registry rows), never by re-cutting the card. That is the extensibility.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_gate.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 AX_EXPOSURE: i64 = 0 |
| 24 | const AX_PARTICIPATE: i64 = 1 |
| 25 | const AX_LINEAGE: i64 = 2 |
| 26 | const AX_PHYSICAL: i64 = 3 |
| 27 | const AX_STEM: i64 = 4 |
| 28 | const AX_BIO: i64 = 5 |
| 39 | const K_DIGITAL: i64 = 1 |
| 40 | const K_PHYSICAL: i64 = 2 |
| 41 | const K_STEM: i64 = 4 |
| 42 | const K_BIO: i64 = 8 |
| 43 | const K_PRODUCT: i64 = 16 |
| 44 | const K_WORKFLOW: i64 = 32 |
| 45 | const K_AGENT: i64 = 64 |
| 46 | const K_ALL: i64 = 127 |
| 48 | const CB_DISK: i64 = 0 // organ opens on disk |
| 49 | const CB_ALLOWLIST: i64 = 1 // node name present in tool_allowlist.conf = on-mcp / is-tool |
| 50 | const CB_POLICY: i64 = 2 // exposure-policy name-classifier: primitive/gate -> internal-by-policy |
| 51 | const CB_DEBT: i64 = 3 // DERIVED: built AND not on-mcp AND not internal-by-policy |
| 52 | const CB_PENDING: i64 = 9 // declared trait, data source not wired yet (honest growth slot) |
functions
| 29 | func ax_name(a: i64) -> *u8 called by 1: at_grade |
| 56 | func tr_def(i: i64, ax: *i64, cb: *i64, applies: *i64, key: *i64, src: *i64) -> i64 |
| 78 | func at_have(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } called by 1: cb_eval |
| 80 | func at_file_has(path: *u8, needle: *u8) -> i64 |
| 96 | func at_is_internal(name: *u8) -> i64 called by 1: cb_eval |
| 105 | func cb_eval(cb: i64, node_name: *u8, node_path: *u8) -> *u8 |
| 120 | func at_grade(node_name: *u8, node_path: *u8, node_kind: i64) -> i64 |
| 141 | func main() -> i64 |