code wiki / (root) / nx_succession.nx

nx_succession.nx

buildroot/runtime/nx_succession.nx

8064 B206 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic succession
docsdependenciesstructsconstsfunctions

about

nx_succession.nx -- ecological succession stage classification for primitives. Biology: ecosystems pass through PIONEER -> MID -> CLIMAX stages. Each stage has different role: pioneers stabilize bare ground (fast-growing, resource-light, short-lived); mid-stage builds soil / canopy (medium lifespan, medium investment); climax is mature, slow-turnover, hosts the most biodiversity. Removing a pioneer from a climax stand causes minor disturbance; removing climax keystones cascades. In Nishi: classify every primitive by succession stage so prune-rebuild decisions know what's safe to recycle vs what's load-bearing. Composes with [[nx_taxonomy]] (orthogonal axis to taxonomic class) and with the drift lifecycle (spore/seed/hypha/fruiting/lichen are PIONEER-class for the most part).

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_succession.nx nx_succession_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_succession_test.nx

structs

41struct NxSuccessionRecord
52struct NxSuccessionRegistry

consts

21const NX_SU_STAGE_PIONEER: nx_int = 0 // fast bootstrap, low investment, removable
22const NX_SU_STAGE_EARLY: nx_int = 1 // first build-out, partial replacement-risk
23const NX_SU_STAGE_MID: nx_int = 2 // load-bearing for current generation
24const NX_SU_STAGE_LATE: nx_int = 3 // load-bearing for multiple generations
25const NX_SU_STAGE_CLIMAX: nx_int = 4 // foundational; removal cascades
26const NX_SU_STAGE_RELICT: nx_int = 5 // mature but isolated; legacy-class
27const NX_SU_STAGE_N: nx_int = 6
31const NX_SU_V_OK: nx_int = 0
32const NX_SU_V_PROMOTION_OK: nx_int = 1 // primitive ready to advance stage
33const NX_SU_V_PREMATURE: nx_int = 2 // promotion before evidence
34const NX_SU_V_REGRESSION_BLOCKED: nx_int = 3 // never demote climax to pioneer
35const NX_SU_V_INVALID: nx_int = 4
36const NX_SU_V_NULL: nx_int = 5
37const NX_SU_V_N: nx_int = 6
50const NX_SU_R_BYTES: nx_int = 40
60const NX_SU_BYTES: nx_int = 32

functions

64func nx_su_stage_is_valid(s: nx_int) -> nx_int
70func nx_su_v_is_valid(v: nx_int) -> nx_int
called by 1: main
76func nx_su_stage_is_removable(s: nx_int) -> nx_int
called by 1: main
82func nx_su_stage_is_load_bearing(s: nx_int) -> nx_int
called by 1: main
91func nx_su_new(capacity: nx_int,
called by 1: main calls 1: sys_mmap
107func _su_record_at(reg: *NxSuccessionRegistry, idx: nx_int) -> *NxSuccessionRecord
116func nx_su_register(reg: *NxSuccessionRegistry,
called by 1: main calls 1: nx_su_stage_is_valid
138func nx_su_find(reg: *NxSuccessionRegistry, primitive_id: nx_int) -> *NxSuccessionRecord
151func nx_su_check_promotion(reg: *NxSuccessionRegistry,
called by 1: main calls 1: nx_su_find
168func nx_su_check_demotion(current_stage: nx_int, proposed_stage: nx_int) -> nx_int
called by 1: main calls 1: nx_su_stage_is_valid
184func nx_su_count_by_stage(reg: *NxSuccessionRegistry, stage: nx_int) -> nx_int
called by 1: main calls 1: _su_record_at
196func nx_su_total_dependents(reg: *NxSuccessionRegistry) -> nx_int
called by 1: main calls 1: _su_record_at