nx_object_spec.nx
buildroot/runtime/nx_object_spec.nx
about
nx_object_spec.nx -- per-part object-class spec catalog.
CAPABILITY_COMPLETENESS: FULL (for the 32 starter specs;
additional specs register via catalog extension at
nishi-library/seeds/object_specs.jsonl)
User direction 2026-05-16:
"expand the concepts into clothing and lots of other patterns
our goal is to be beyond s class at validating what we ask is
what we get so a dnd sword isnt a bubble wand"
Generalises the per-region modesty pattern (nx_modesty_profile)
into universal per-part object-class verification:
spec = required parts + optional parts + distinguishing
negations (parts that MUST NOT appear)
Catches near-neighbour-class confusion that silhouette-only
classifiers miss. A "sword" with no crossguard + a loop at
the end is a BUBBLE_WAND, not a sword. The negations list
names what would make this NOT the asked-for class.
genealogy_id: substrate_object_spec_validation_2026_05_16
lineage_id: nx_object_spec_v1
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nx
imported by: nx_catalog_id_lookup.nxnx_object_spec_match.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 182 | struct NxObjectSpec |
consts
| 37 | const NX_PT_BLADE: nx_int = 0 |
| 38 | const NX_PT_EDGE: nx_int = 1 |
| 39 | const NX_PT_POINT: nx_int = 2 |
| 40 | const NX_PT_TANG: nx_int = 3 |
| 41 | const NX_PT_CROSSGUARD: nx_int = 4 |
| 42 | const NX_PT_GRIP: nx_int = 5 |
| 43 | const NX_PT_POMMEL: nx_int = 6 |
| 44 | const NX_PT_HAFT: nx_int = 7 |
| 45 | const NX_PT_HEAD_WEAPON: nx_int = 8 |
| 46 | const NX_PT_LIMB_BOW: nx_int = 9 |
| 47 | const NX_PT_STRING_BOW: nx_int = 10 |
| 48 | const NX_PT_NOCK: nx_int = 11 |
| 49 | const NX_PT_FLETCHING: nx_int = 12 |
| 52 | const NX_PT_HANDLE_STICK: nx_int = 13 |
| 53 | const NX_PT_LOOP: nx_int = 14 |
| 54 | const NX_PT_FILM: nx_int = 15 |
| 55 | const NX_PT_NIB: nx_int = 16 |
| 56 | const NX_PT_TIP: nx_int = 17 |
| 57 | const NX_PT_FLAME: nx_int = 18 |
| 60 | const NX_PT_COLLAR: nx_int = 19 |
| 61 | const NX_PT_NECKLINE: nx_int = 20 |
| 62 | const NX_PT_SLEEVE_SHORT: nx_int = 21 |
| 63 | const NX_PT_SLEEVE_LONG: nx_int = 22 |
| 64 | const NX_PT_CUFF: nx_int = 23 |
| 65 | const NX_PT_HEM: nx_int = 24 |
| 66 | const NX_PT_WAISTBAND: nx_int = 25 |
| 67 | const NX_PT_BUTTON: nx_int = 26 |
| 68 | const NX_PT_ZIPPER: nx_int = 27 |
| 69 | const NX_PT_POCKET: nx_int = 28 |
| 70 | const NX_PT_LAPEL: nx_int = 29 |
| 71 | const NX_PT_HOOD: nx_int = 30 |
| 72 | const NX_PT_BRA_CUP: nx_int = 31 |
| 73 | const NX_PT_BRA_STRAP: nx_int = 32 |
| 76 | const NX_PT_HEAD: nx_int = 33 |
| 77 | const NX_PT_TUSK: nx_int = 34 |
| 78 | const NX_PT_HORN: nx_int = 35 |
| 79 | const NX_PT_WING: nx_int = 36 |
| 80 | const NX_PT_TAIL: nx_int = 37 |
| 81 | const NX_PT_SCALE: nx_int = 38 |
| 82 | const NX_PT_FUR: nx_int = 39 |
| 83 | const NX_PT_POINTED_EAR: nx_int = 40 |
| 84 | const NX_PT_CLAW: nx_int = 41 |
| 85 | const NX_PT_FANG: nx_int = 42 |
| 88 | const NX_PT_WHEEL: nx_int = 43 |
| 89 | const NX_PT_WINDSHIELD: nx_int = 44 |
| 90 | const NX_PT_HEADLIGHT: nx_int = 45 |
| 91 | const NX_PT_LICENSE_PLATE: nx_int = 46 |
| 92 | const NX_PT_MIRROR: nx_int = 47 |
| 93 | const NX_PT_GRILLE: nx_int = 48 |
| 94 | const NX_PT_HANDLEBAR: nx_int = 49 |
| 97 | const NX_PT_WALL: nx_int = 50 |
| 98 | const NX_PT_WINDOW_PANE: nx_int = 51 |
| 99 | const NX_PT_DOOR: nx_int = 52 |
| 100 | const NX_PT_ROOF: nx_int = 53 |
| 101 | const NX_PT_BATTLEMENT: nx_int = 54 |
| 102 | const NX_PT_ARROW_SLIT: nx_int = 55 |
| 103 | const NX_PT_TURRET: nx_int = 56 |
| 104 | const NX_PT_CHIMNEY: nx_int = 57 |
| 107 | const NX_PT_RESERVED_58: nx_int = 58 |
| 108 | const NX_PT_RESERVED_59: nx_int = 59 |
| 109 | const NX_PT_RESERVED_60: nx_int = 60 |
| 110 | const NX_PT_RESERVED_61: nx_int = 61 |
| 111 | const NX_PT_RESERVED_62: nx_int = 62 |
| 112 | const NX_PT_RESERVED_63: nx_int = 63 |
| 113 | const NX_PT_N_PARTS: nx_int = 64 |
| 124 | const NX_SPEC_SWORD_LONG: nx_int = 0 |
| 125 | const NX_SPEC_SWORD_SHORT: nx_int = 1 |
| 126 | const NX_SPEC_DAGGER: nx_int = 2 |
| 127 | const NX_SPEC_SPEAR: nx_int = 3 |
| 128 | const NX_SPEC_AXE_BATTLE: nx_int = 4 |
| 129 | const NX_SPEC_MACE: nx_int = 5 |
| 130 | const NX_SPEC_HAMMER_WAR: nx_int = 6 |
| 131 | const NX_SPEC_BOW_LONG: nx_int = 7 |
| 132 | const NX_SPEC_STAFF_QUARTER: nx_int = 8 |
| 133 | const NX_SPEC_WAND_MAGIC: nx_int = 9 |
| 136 | const NX_SPEC_SHIRT_BUTTON: nx_int = 10 |
| 137 | const NX_SPEC_SHIRT_T: nx_int = 11 |
| 138 | const NX_SPEC_PANTS_JEANS: nx_int = 12 |
| 139 | const NX_SPEC_DRESS_SUNDRESS: nx_int = 13 |
| 140 | const NX_SPEC_COAT_TRENCH: nx_int = 14 |
| 141 | const NX_SPEC_HAT_FEDORA: nx_int = 15 |
| 142 | const NX_SPEC_LINGERIE_BRA: nx_int = 16 |
| 145 | const NX_SPEC_ORC_STANDARD: nx_int = 17 |
| 146 | const NX_SPEC_ELF_HIGH: nx_int = 18 |
| 147 | const NX_SPEC_DRAGON_WESTERN: nx_int = 19 |
| 148 | const NX_SPEC_WEREWOLF: nx_int = 20 |
| 151 | const NX_SPEC_CAR_SEDAN: nx_int = 21 |
| 152 | const NX_SPEC_MOTORCYCLE: nx_int = 22 |
| 155 | const NX_SPEC_CASTLE_MEDIEVAL: nx_int = 23 |
| 158 | const NX_SPEC_BUBBLE_WAND: nx_int = 24 |
| 159 | const NX_SPEC_PEN_BALLPOINT: nx_int = 25 |
| 160 | const NX_SPEC_TORCH: nx_int = 26 |
| 161 | const NX_SPEC_FLASHLIGHT: nx_int = 27 |
| 164 | const NX_SPEC_RESERVED_28: nx_int = 28 |
| 165 | const NX_SPEC_RESERVED_29: nx_int = 29 |
| 166 | const NX_SPEC_RESERVED_30: nx_int = 30 |
| 167 | const NX_SPEC_RESERVED_31: nx_int = 31 |
| 168 | const NX_SPEC_N_SPECS: nx_int = 32 |
| 178 | const NX_SPEC_MAX_REQUIRED: nx_int = 16 |
| 179 | const NX_SPEC_MAX_OPTIONAL: nx_int = 16 |
| 180 | const NX_SPEC_MAX_NEGATIONS: nx_int = 16 |
| 193 | const NX_SPEC_BYTES: nx_size = 56 |
functions
| 115 | func nx_part_is_valid(p: nx_int) -> nx_int called by 1: main |
| 170 | func nx_object_spec_is_valid(s: nx_int) -> nx_int |
| 197 | func _spec_alloc_part_list() -> *nx_int |
| 210 | func _spec_build_sword_long() -> *NxObjectSpec |
| 243 | func _spec_build_bubble_wand() -> *NxObjectSpec |
| 273 | func _spec_build_dagger() -> *NxObjectSpec |
| 298 | func _spec_build_bow_long() -> *NxObjectSpec |
| 322 | func _spec_build_wand_magic() -> *NxObjectSpec |
| 350 | func _spec_build_shirt_button() -> *NxObjectSpec |
| 375 | func _spec_build_shirt_t() -> *NxObjectSpec |
| 400 | func _spec_build_lingerie_bra() -> *NxObjectSpec |
| 425 | func _spec_build_orc() -> *NxObjectSpec |
| 448 | func _spec_build_elf() -> *NxObjectSpec |
| 472 | func _spec_build_dragon() -> *NxObjectSpec |
| 500 | func _spec_build_car_sedan() -> *NxObjectSpec |
| 524 | func _spec_build_motorcycle() -> *NxObjectSpec |
| 547 | func _spec_build_castle() -> *NxObjectSpec |
| 573 | func nx_object_spec_get(spec_id: nx_int) -> *NxObjectSpec |
| 596 | func nx_object_spec_part_required(spec: *NxObjectSpec, part_id: nx_int) -> nx_int called by 1: main |
| 606 | func nx_object_spec_part_negated(spec: *NxObjectSpec, part_id: nx_int) -> nx_int called by 1: main |
| 618 | func main() -> nx_int |