code wiki / (root) / nx_probiome.nx

nx_probiome.nx

buildroot/runtime/nx_probiome.nx

28820 B708 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind librarytopic probiome
docsdependenciesstructsconstsfunctions

about

nx_probiome.nx -- R6 of the FERMENTATION ladder: the cross-kingdom BENEFICIAL-MICROBE engine. The fermentation rungs (R0-R5) run the yogurt/cheese PROCESS safely; this rung models the CULTURES THEMSELVES as biology -- which organism confers which benefit to which host, and whether it is safe to use at all -- and generalises the yogurt/cheese "good bacteria" idea across all of life: PEOPLE (gut probiotics), PLANTS (rhizosphere PGPR, nitrogen fixers, mycorrhizae), ANIMALS (direct-fed microbials), and ORGANISMS-IN-GENERAL (soil nitrifiers, composters, bioremediators). One engine, four host kingdoms -- the "One Health" pattern (a single microbe can lift people AND plants AND soil). v2 (2026-07-09) widens beyond bacteria to ORGANISMS IN GENERAL: a microbe_domain axis (bacterium / yeast / mold / mycorrhizal fungus) so the engine covers the real biology of fermentation and plant health -- acetic-acid bacteria (kombucha/vinegar), probiotic + leavening yeasts, koji/tempeh/cheese molds, and arbuscular mycorrhizal fungi -- not just bacteria. Additive, never reductive: every earlier strain is kept. THE NEVER-HARM LAW (the cross-kingdom analog of nx_ferment_safety's never-poison law, Global Rule 26): a beneficial-microbe capability may NEVER recommend or admit an organism that is unsafe for its host. STRUCTURAL refusal, not a warning string: - a frank PATHOGEN (Listeria monocytogenes, ...) is ALWAYS refused; - an OPPORTUNIST / non-QPS organism (Enterococcus faecium, which can carry transferable vancomycin resistance and is a nosocomial pathogen) is refused for general use; - an organism that carries acquired ANTIBIOTIC RESISTANCE is refused (it could transfer the resistance in the gut/rumen/soil); - a TOXIGENIC organism is refused even though its genus contains QPS members -- a "qualified" strain must PASS its qualification. Two genus-level liar-kill pairs prove this MECHANICALLY: Bacillus subtilis (QPS) vs B. cereus (cereulide toxin), and Aspergillus oryzae (safe domesticated koji mold) vs A. flavus (aflatoxin); - a HOST MISMATCH is refused: a soil/plant nitrogen-fixer is NOT a human probiotic (do not eat Rhizobium as a gut culture), and the recommender will never hand you a strain outside the target host. Unknown strain ids FAIL CLOSED (treated as pathogens). THE EXCEED (measured, liar-killed by the gate -- see the _test):

dependencies 1 imports · 7 importers

nx_syscalls.nx nx_probiome.nx nx_ferment_cultures.nx nx_ferment_cultures_test.nx nx_probiome_garden.nx nx_probiome_garden_test.nx nx_probiome_provenance.nx nx_probiome_provenance_test.nx nx_probiome_test.nx

imports: nx_syscalls.nx

imported by: nx_ferment_cultures.nxnx_ferment_cultures_test.nxnx_probiome_garden.nxnx_probiome_garden_test.nxnx_probiome_provenance.nxnx_probiome_provenance_test.nxnx_probiome_test.nx

structs

228struct NxProbiomeStrain

consts

86const PB_HOST_HUMAN: i64 = 0
87const PB_HOST_PLANT: i64 = 1
88const PB_HOST_ANIMAL: i64 = 2
89const PB_HOST_SOIL: i64 = 3 // organisms/environment in general
90const PB_HOST_N: i64 = 4
94const PB_HB_HUMAN: i64 = 1
95const PB_HB_PLANT: i64 = 2
96const PB_HB_ANIMAL: i64 = 4
97const PB_HB_SOIL: i64 = 8
101const PB_DOM_BACTERIUM: i64 = 0
102const PB_DOM_YEAST: i64 = 1 // unicellular fungi (Saccharomyces...)
103const PB_DOM_MOLD: i64 = 2 // filamentous fungi (Rhizopus, koji...)
104const PB_DOM_MYCORRHIZAL: i64 = 3 // arbuscular mycorrhizal root symbionts
105const PB_DOM_N: i64 = 4
109const PB_MECH_LACTIC: i64 = 0 // lactic-acid souring / preservation
110const PB_MECH_SCFA: i64 = 1 // short-chain fatty acids (butyrate)
111const PB_MECH_EXCLUSION: i64 = 2 // competitive pathogen exclusion
112const PB_MECH_VITAMIN: i64 = 3 // vitamin K / B (incl B12) synthesis
113const PB_MECH_IMMUNE: i64 = 4 // immune modulation
114const PB_MECH_NFIX: i64 = 5 // nitrogen fixation
115const PB_MECH_PSOL: i64 = 6 // phosphate solubilization / uptake
116const PB_MECH_PHYTOHORMONE: i64 = 7 // IAA/auxin plant growth promotion
117const PB_MECH_BIOCONTROL: i64 = 8 // antifungal / induced systemic resistance
118const PB_MECH_FEED: i64 = 9 // feed efficiency / rumen stabilization
119const PB_MECH_BIOREMEDIATION: i64 = 10 // degrade pollutants
120const PB_MECH_NITRIFICATION: i64 = 11 // ammonia -> nitrite (N cycle)
121const PB_MECH_ACETIC: i64 = 12 // acetic / organic-acid preservation
122const PB_MECH_LEAVENING: i64 = 13 // CO2 / ethanol fermentation (rise)
123const PB_MECH_PREDIGEST: i64 = 14 // proteolysis -> bioavailable nutrients
124const PB_MECH_MYCORRHIZAL: i64 = 15 // root symbiosis: water + nutrient uptake
125const PB_MECH_N: i64 = 16
129const PB_MB_LACTIC: i64 = 1
130const PB_MB_SCFA: i64 = 2
131const PB_MB_EXCLUSION: i64 = 4
132const PB_MB_VITAMIN: i64 = 8
133const PB_MB_IMMUNE: i64 = 16
134const PB_MB_NFIX: i64 = 32
135const PB_MB_PSOL: i64 = 64
136const PB_MB_PHYTOHORMONE: i64 = 128
137const PB_MB_BIOCONTROL: i64 = 256
138const PB_MB_FEED: i64 = 512
139const PB_MB_BIOREMEDIATION: i64 = 1024
140const PB_MB_NITRIFICATION: i64 = 2048
141const PB_MB_ACETIC: i64 = 4096
142const PB_MB_LEAVENING: i64 = 8192
143const PB_MB_PREDIGEST: i64 = 16384
144const PB_MB_MYCORRHIZAL: i64 = 32768
148const PB_SAFE_QPS: i64 = 0 // presumed safe (QPS / GRAS)
149const PB_SAFE_QUALIFIED: i64 = 1 // QPS *with qualifications*: safe iff
151const PB_SAFE_OPPORTUNIST: i64 = 2 // not QPS; opportunist / transferable AMR
152const PB_SAFE_PATHOGEN: i64 = 3 // frank pathogen -- always refused
153const PB_SAFE_N: i64 = 4
157const PB_GEN_LACTOBACILLUS: i64 = 0
158const PB_GEN_BIFIDOBACTERIUM: i64 = 1
159const PB_GEN_STREPTOCOCCUS: i64 = 2
160const PB_GEN_LACTOCOCCUS: i64 = 3
161const PB_GEN_BACILLUS: i64 = 4
162const PB_GEN_RHIZOBIUM: i64 = 5
163const PB_GEN_BRADYRHIZOBIUM: i64 = 6
164const PB_GEN_AZOSPIRILLUM: i64 = 7
165const PB_GEN_AZOTOBACTER: i64 = 8
166const PB_GEN_PSEUDOMONAS: i64 = 9
167const PB_GEN_ENTEROCOCCUS: i64 = 10
168const PB_GEN_LISTERIA: i64 = 11
169const PB_GEN_NITROSOMONAS: i64 = 12
170const PB_GEN_ACETOBACTER: i64 = 13
171const PB_GEN_PROPIONIBACTERIUM: i64 = 14
172const PB_GEN_LEUCONOSTOC: i64 = 15
173const PB_GEN_SACCHAROMYCES: i64 = 16
174const PB_GEN_KLUYVEROMYCES: i64 = 17
175const PB_GEN_RHIZOPUS: i64 = 18
176const PB_GEN_PENICILLIUM: i64 = 19
177const PB_GEN_ASPERGILLUS: i64 = 20
178const PB_GEN_TRICHODERMA: i64 = 21
179const PB_GEN_GLOMUS: i64 = 22 // arbuscular mycorrhizal fungi
180const PB_GEN_N: i64 = 23
184const PB_OK: i64 = 0
185const PB_REFUSED_PATHOGEN: i64 = 1
186const PB_REFUSED_OPPORTUNIST: i64 = 2
187const PB_REFUSED_AMR: i64 = 3
188const PB_REFUSED_TOXIGENIC: i64 = 4
189const PB_REFUSED_HOST_MISMATCH: i64 = 5
190const PB_REFUSED_BAD_HOST: i64 = 6
194const PB_STR_L_ACIDOPHILUS: i64 = 0
195const PB_STR_L_RHAMNOSUS_GG: i64 = 1
196const PB_STR_B_LONGUM: i64 = 2
197const PB_STR_S_THERMOPHILUS: i64 = 3
198const PB_STR_L_LACTIS: i64 = 4
199const PB_STR_B_SUBTILIS: i64 = 5
200const PB_STR_RHIZOBIUM: i64 = 6
201const PB_STR_BRADYRHIZOBIUM: i64 = 7
202const PB_STR_AZOSPIRILLUM: i64 = 8
203const PB_STR_AZOTOBACTER: i64 = 9
204const PB_STR_P_FLUORESCENS: i64 = 10
205const PB_STR_E_FAECIUM: i64 = 11 // OPPORTUNIST (vanA AMR) -- liar-kill
206const PB_STR_B_CEREUS: i64 = 12 // TOXIGENIC Bacillus -- liar-kill
207const PB_STR_LISTERIA: i64 = 13 // PATHOGEN -- liar-kill
208const PB_STR_NITROSOMONAS: i64 = 14
209const PB_STR_P_PUTIDA: i64 = 15 // bioremediation
210const PB_STR_ACETOBACTER: i64 = 16 // kombucha/vinegar (acetic-acid bacteria)
211const PB_STR_L_KEFIRI: i64 = 17 // kefir
212const PB_STR_PROPIONIBACTERIUM: i64 = 18 // Swiss cheese + B12
213const PB_STR_LEUCONOSTOC: i64 = 19 // kraut/kimchi early phase
214const PB_STR_S_BOULARDII: i64 = 20 // probiotic YEAST
215const PB_STR_S_CEREVISIAE: i64 = 21 // baker's/brewer's YEAST
216const PB_STR_K_MARXIANUS: i64 = 22 // kefir YEAST
217const PB_STR_RHIZOPUS: i64 = 23 // tempeh MOLD
218const PB_STR_P_ROQUEFORTI: i64 = 24 // blue-cheese MOLD
219const PB_STR_A_ORYZAE: i64 = 25 // koji MOLD (safe, domesticated)
220const PB_STR_A_FLAVUS: i64 = 26 // AFLATOXIN MOLD -- liar-kill
221const PB_STR_TRICHODERMA: i64 = 27 // plant biocontrol fungus
222const PB_STR_MYCORRHIZA: i64 = 28 // arbuscular mycorrhizal fungi
223const PB_STR_B_AMYLOLIQUEFACIENS: i64 = 29 // PGPR biofungicide bacterium
224const PB_STR_N: i64 = 30

functions

246func nx_probiome_strain(id: i64) -> *NxProbiomeStrain
566func nx_probiome_strain_count() -> i64
called by 1: main
576func nx_probiome_admit(s: *NxProbiomeStrain, target_host: i64) -> i64
595func pb_benefits_host(s: *NxProbiomeStrain, host: i64) -> i64
called by 1: main
603func pb_has_mechanism(s: *NxProbiomeStrain, mech: i64) -> i64
611func pb_host_count(s: *NxProbiomeStrain) -> i64
called by 2: pb_is_keystonemain
622func pb_mech_count(s: *NxProbiomeStrain) -> i64
634func pb_is_safe(s: *NxProbiomeStrain) -> i64
643func pb_is_keystone(s: *NxProbiomeStrain) -> i64
called by 1: main calls 2: pb_is_safepb_host_count
657func nx_probiome_recommend(host: i64, mech: i64) -> i64
677func nx_probiome_recommend_benefit(host: i64, mech: i64) -> i64
685func nx_probiome_count_safe_for(host: i64) -> i64
697func nx_probiome_count_domain(domain: i64) -> i64
called by 1: main calls 2: nx_probiome_strainpb_is_safe